JSON

Pataasin ang iyong marka sa homework at exams ngayon gamit ang Quizwiz!

What can you do with a combination of JSON, XSLT and XQuery 3.x I

- continue to maintain the primary source material as XML - continue to process that XML with XSLT and XQuery - use both XSLT and XQuery to transform/convert my XML to JSON Objects when necessary - use both XSLT and XQuery to store and convert JSON Objects I receive from partner organizations into an XML structure that works with my existing XML data

How does JSON-LD expand on the promise of open and interoperable data?

- it enables data to be open and published in a non-proprietary format using standard vocabularies - it provides extensibility in that anyone can easily add to data provided in JSON-LD format without complex embedding rules

How can you define regular expressions in JSON?

By using 'pattern' property and 'patternProperties'

What does 'valid' mean?

It means that there is a schema, or definition, that indicates what elements are allowed where, in what quantity, with that constraints.

How does JSON schema define individual properties and their validation rules?

It uses name:value pairs, arrays, and objects.

What does JSON-LD add to regular JSON?

JSON-LD is both an RDF document and a JSON document and JSON-LD adds meaning to resources following Linked Data principles.

How does JSON schema define validation rules in particular?

The TYPE keyword is the primary means of declaring these validation rules.

What are Objects?

Collections of name/value pairs.

What should be remembered when working with 3rd parties understanding of content?

Developers aren't always content creators or content managers. Developers will need help understanding your data structures and the reasons why you use one format or another. They will also need to understand any rules or logic behind your data structure

What do you declare with the schema Properties Object?

Definitions for all the valid properties of any author record JSON object, these include: name and it's sub-properties, role, degrees, and affiliation and its sub-properties.

How is a JSON NUMBER defined?

A double-precision floating-point format number

What describes the JSON control character \r

Carriage return

What does (...) do in a JSON Schema regular expression?

Group a series of regular expressions into a single regular expression.

What does the JSON-LD keyword @context do?

It sets the context for terms that are used in a JSON-LD document, it maps terms to IRIs (think @PREFIX in RDF). For example, if I want to use the schema.org vocabulary in my JSON-LD document I would set @context to the following: { "@context" : "http://schema.org/" }

What do you do if you can't determine the current version of the JSON Schema specification?

It's not always easy to know what is the latest version of the specification, so I recommend specifying a specific version of the specification

What are JSON and XML schemas written in?

JSON Schemas are written in JSON, XML Schemas are written in XML

What can JSON do with its simple structure?

JSON can encode numbers, strings, arrays, and objects using strings of plain text. One can also nest arrays and objects to create more complex data structures, although this can can be both a curse and a blessing

How does JSON provide complete integration of all traditional databases and formats?

JSON does not have a <[CDATA[]]> feature, so it is not well suited to act as a carrier of sounds or images or other large binary payloads. JSON is optimized for data. Besides, delivering executable programs in a data-interchange system could introduce dangerous security problems.

XML vs JSON, which provides the best display capabilities?

JSON does not provide any display capabilities because it is not a document markup language.

How is JSON popular in working with data?

JSON has also recently become popular as a simple data format for storage in digital repositories, again because of its simple structure and because the syntax is expressed in plain text.

How do XML and JSON compare in regard to openess?

JSON is at least as open as XML, perhaps more so because it is not in the center of corporate/political standardization struggles.

What is the difference between JSON and JSON-LD?

JSON is popular for serializing data in a semi-structured manner and is used primarily for data interchange between computer systems, services, and applications JSON-LD is a way to integrate JSON with Linked Data and semantics for use on the Web (for example, by search engines, Web services, knowledge services).

4 main syntax rules: how do you separate DATA name:value pairs?

JSON name:value pairs are separated by commas

How can you differentiate JSON from JSON Schema?

JSON schema makes use of name:value pairs, Objects, and Arrays. The difference is the way in which JSON Schema uses specific keywords to construct a schema definition.

How does JSON-LD relate to RDF?

JSON-LD is a concrete RDF syntax as described in [RDF11-CONCEPTS]. Hence, a JSON-LD document is both an RDF document and a JSON document

What is the current version of JSON-LD

JSON-LD is relatively new, having become a standard in 2014. Currently the standard is in version 1.0 with a new version (1.1) currently in draft status,

What subset of regular expression language does JSON Schema use?

Javascript (ECMS 262) regular expressions

What describes the JSON control character \"

Quotation mark

How do self-contained JSON documents make sharding data across a cluster easy?

The JSON document is not confined within a column in a relational table, but is stored naturally as-is and can be indexed by the database. In some NoSQL databases, JSON documents are automatically sharded and evenly distributed across multiple servers. The multiple copies of a document within the cluster increases reliability: If a node goes down, the database keeps chugging along without any significant loss.

Why is it necessary to use a working URL when declaring a unique identifier?

The URL is important for the validation process as it also declares a base URL for any other JSON Schema file reference in your schema.

What is the primary difference between JSON-LD and RDF?

The desire for better Web APIs is what motivated the creation of JSON-LD, not the Semantic Web. It starts at basics, assuming that the audience is a web developer with modest training. It strives to help developers get to the "adjacent possible" using commonly used web tools. It showcases the power of Linked Data without having to go through the somewhat steep learning curve that the Semantic Web usually has because of grand view of RDF, SPARQL, OWL etc.

If a Property or SubProperty does not conform to the defined property names and datatypes, what will happen?

The document will not pass validation.

What is one of the main benefits to using JSON?

The minimal joins and schema changes that are required when an app changes.

What is the advantage to including the JSON Schema title and description properties?

These reserved properties are used in JSON Schema to enable authors to provide descriptive information about their schema. If you plan on sharing your schema, or even if you aren't, consider it a best practice to provide some simple descriptive documentation that can travel with your schema.

What are the current drawbacks to using 'patternProperties'?

They are more complex, very new, and not fully supported by schema validators yet.

How must JSON NUMBER values be presented?

They do not require quotation marks, unless the number is represented as a string, for example: "total":123.00 "grade":50.2

What does starting the schema proper by declaring: "type": "object" do?

This states to the validating processor that the JSON I want to validate (using our schema) must be a JSON Object.

What is the most common use for JSON-LD?

To add meaning and metadata to a website or web page - this is similar to how RDFa can be embedded on a web page. Unlike RDFa, JSON-LD is not embedded in HTML content via Properties, rather, an entire JSON-LD object is embedded in HTML using HTMLs script tags

What can the 'enum' keyword be used for?

To set a fixed set of acceptable values for any property. It can be used in concert with the type keyword or without the type keyword. For example, to restrict the values of the role property to a small controlled vocabulary: "role": { "type": "string", "enum": ["author", "contributor", "editor"] }

What describes the JSON control character \u+four hexadecimal digits

Unicode escape sequences

Is XML or JSON better for text documents?

Use XML for text documents

What happens in the above when using an Object as a Value?

Using a JSON Object as a value in the 'cat' name:value pair. When you use a JSON Object as a value, the same Object rules apply, all you are doing is positioning the Object as a value in a name:value pair.

How do you declare a specific version of the JSON Schema specification?

{ "$schema": "http://json-schema.org/draft-04/schema#" }

What is the syntax for declaring a unique identifier?

{ "$schema": "http://json-schema.org/draft-04/schema#", "id": "http://example.org/schemas/myschema.json" }

What syntax do you place at the root of a document to declare a JSON Schema?

{ "$schema": "http://json-schema.org/schema#" }

What are the most common JSON-LD keywords?

• @context • @type • @id • @vocab

Why should you always use the optional $schema key:value pair that declares a JSON document as a Schema document?

• the $schema declaration is a clear indicator that the JSON you are looking at is in fact a Schema • the $schema declaration is a clear indicator of the version of the JSON Schema specification that you are using

What factors should be considered when choosing between XML and JSON?

• the nature of your project and your data • the kinds of transformations (if any) you need to perform on your data • whether or not you plan on sharing your data.

What are JSONs advantages?

◦ It's easy to write ◦ It's easy to read ◦ It's easy to process ◦ It's easy for humans and machines to understand ◦ Nearly all programming languages contain functions or libraries that can read and write JSON structures ◦ It's compact ◦ It's a good format for Big Data

What is Unstructured Data?

Data or information that is not stored in rows and columns in a relational database. This refers to data that has no structure or data model, is unorganized or raw. Examples include: images word processed documents, mp3 files, videos, social media data streams, or any kind of raw text data. Unstructured data may contain important information (dates, facts, terms, etc.) but these pieces of information are difficult to parse or find within the data because it lacks structure or definition. 90% of all data.

What is the next 'best practice' step after adding the version of the JSON Schema specification?

Declare a unique identifier for your schema.

What is the description of the JSON NUMBER fraction type?

Digits e.g.: .3, .9

How does XML provide complete integration of all traditional database formats?

(Statements about XML are sometimes given to a bit of hyperbole.) XML documents can contain any imaginable data type - from classical data like text and numbers, or multimedia objects such as sounds, to active formats like Java applets or ActiveX components.

What does ? do in a JSON Schema regular expression?

Matches zero or one repetitions of the preceding regular expression.

What are some core differences between JSON and JSON-LD?

-Where JSON uses numbers, strings and a small number of other data formats, JSON-LD adds IRIs and URLs. -Where JSON data contains no semantic meaning, JSON-LD strives to add "unambiguous meaning" to data, by means of IRIs and URLs, while maintaining that simple JSON format

What are the core TYPE keyword rules in the JSON Schema Specification?

1 - If it's a string, it is the name of one of the basic types such as name and it's sub-properties, role, degrees, and affiliation and its sub-properties 2 - If it is an array, it must be an array of strings, where each string is the name of one of the basic types, and each element is unique. In this case, the JSON snippet is valid if it matches any of the given types

Of the most common JSON-LD keywords, which indicates you are working with JSON-LD?

@context is the most important and it's presence indicates that you are working with a JSON-LD document

What is BSON?

Binary JSON - binary encoded serialization of JSON like documents - It is lightweight, traversable and efficient

What types of validation do XML and JSON schemas support?

Both JSON and XML Schema enable structural validation, but do not facilitate semantic validation. Other technologies are required to handle validation at the semantic level, e.g. relationships between elements or name:value pairs, valid values. XML has technologies such as RelaxNG or Schematron to handle semantic validation. In JSON, similar types of validation can be handled by custom code written in any of the programming languages that provide JSON support

What to JSON and XML schemas describe?

Both JSON and XML Schemas describe the structure of other pieces of data

What does * do in a JSON Schema regular expression?

Matches zero or more repetitions of the preceding regular expression.

Why is discussion necessary when working with 3rd parties?

Listen to your partners/developers. They can bring different perspectives to your data and to your needs. In our case, that meant providing JSON for some tasks, XML for others.

What does {x,y} do in a JSON Schema regular expression?

Match at least x and at most y occurrences of the preceding regular expression.

What does {x} do in a JSON Schema regular expression?

Match exactly x occurrences of the preceding regular expression.

What does {x,} do in a JSON Schema regular expression?

Match x occurrences or more of the preceding regular expression.

What does [^abc] do in a JSON Schema regular expression?

Matches any character not listed.

What does [^a-z] do in a regular JSON Schema expression?

Matches any character outside of the range.

What does [abc] do in a JSON Schema regular expression?

Matches any of the characters inside the square brackets.

What does | do in a JSON Schema regular expression?

Matches either the regular expression preceding or following the | symbol.

What does + do in a JSON Schema regular expression?

Matches one or more repetitions of the preceding regular expression.

What does ^ do in a JSON Schema regular expression?

Matches only at the beginning of the string

What does $ do in a JSON Schema regular expression?

Matches only at the end of the string

What does [a-z] do in a JSON Schema regular expression?

Matches the range of characters.

In view of the 4 main syntax rules, what governs Arrays?

ORDERED LISTS OF DATA are defined by square brackets [ .. ]

What two main structures compose JSON?

Objects and Arrays

What are Arrays?

Ordered lists of values.

What describes the JSON control character \/

Reverse solidus

What does using "http://json-schema.org/schema#" indicate to the schema processor?

That your schema is using the most current version of the JSON Schema specification, whatever that version is.

What should be remembered about +? *? and ?? in a JSON Schema regular expression?

The *, +, and ? qualifiers are all greedy; they match as much text as possible. Sometimes this behavior isn't desired and you want to match as few characters as possible.

What should be remembered regarding your source data when working with 3rd parties?

When working with developers or 3rd parties, be clear about the source data that they will be working with. You know your data, they don't, so good documentation or conversation will be necessary.

Do both XML and JSON support automated validation of data?

Yes.

JSON Document's flexibility and ease of use enables developers how?

Application developers can quickly start working with the data, while the database easily adapts to changes in the data structure. JSON documents can store rich data that can be sparse, hierarchical or collect values that are deep-nested, such as arrays. JSON values are also dynamically typed, with no fixed data type for attributes across different documents.

What describes the JSON control character \b

Backspace

What can be used as an exchange format to enable users to move their data between similar applications?

Both XML and JSON

What describes the JSON control character \f

Formfeed

What describes the JSON control character \t

Tab

What are JSON Objects comprised of?

Unordered sets of name:value pairs (separated by commas) enclosed in curly brackets { ... }.

Is XML or JSON better for metadata?

Use JSON for less complex data structures, like metadata records

What can be used to add a structure to data so that it is richer in information?

Both XML and JSON

What is the description of the JSON NUMBER exponent type?

e digits e.g.: e, e+, e-, E, E+, E

What is Flynn's Rule?

"If you get your data model right, everything else pretty much drops into place, if you get your data model wrong, your project is hosed from the start"

Why should you always spend time working on your data model?

"just add a new field" is never a good solution, it can have far reaching implications depending on the technologies you are using to encode your data and code your logic.

XML vs JSON regarding Data Sharing and Structure?

-JSON is praised because it uses data in easy numeric and text formats. -JSON uses arrays and objects to store records whereas XML uses a node hierarchy. -In data storage, both JSON and XML are said to have tree structures. -Since most programming languages have corresponding array and object data structures, JSON data can be processed most programming language without the need of a specific programming language (e.g. XQuery) to process JSON or transform data into a specific data model or format prior to processing making JSON a good choice if reusing or sharing data by many different developers in contexts and projects -While both are capable, if the services and applications the data are being built around require APIs or other web-based interface technologies, developers will tend to prefer JSON because of it's simplicity and its process-ability/usability by many programming languages.

Why should you always use a schema?

A good schema should help you describe your data in a way that enables downstream consumers to process your data effectively

What is the form of JSON name:value pairs?

A name in double quotes, followed by a colon, followed by a value, sometimes also in double quotes, for example:"pet":"dog"

XML vs JSON regarding DATA FORMATS

Basic JSON supports text and numeric data formats. Simplicity is one of the main benefits of JSON and its data format requirement is one of the reasons for that simplicity. With XML, you can use many different data formats, including binary data formats.

Should you pick XML or JSON and stick to it?

Be flexible and make sure your toolkit is as flexible as you need it to be: you will likely work with both XML and JSON both in your own work and in any partnerships you engage in. You want to have the tools and the skills needed to manage both semi-structured data formats.

XML vs JSON - which provides self-describing data?

Both XML and JSON.

What takes advantage of a wide range of reusable software available to programmers so they don't have to re-invent code?

Both though JSON, being a simpler notation, needs much less specialized software. In the languages JavaScript and Python, the JSON notation is built into the programming language; no additional software is needed at all. In other languages, only a small amount of JSON-specific code is necessary.

What advantages do NoSQL databases find when they support JSON natively?

the JSON document is self- and schema-free. This means that an application can change without the time-consuming process of editing the schema, including adding more tables or columns. Developers don't have to early bind the schema during the insert operation. However, if a developer later reconsiders about capturing other data attributes, the developer would not have to update a schema and re-normalize all the things, as one would in a relational database.

An example of a JSON Object

{ "id": "958-0542580", "cat": "book", "name": "Your Movie Sucks", "author": "Roger Ebert", "genre_s": "film", "inStock": true, "price": 12.5, "pages_i": 500 }

Why will technology leaders look to solutions like NoSQL and JSON that can keep pace?

Businesses are increasingly pressured to deliver results and drive revenue up in an ever-changing environment. This is especially relevant for the sectors that overlap with big data, the Internet of Things, and mobile enterprise applications. Business leaders must take care to understand how the technologies they are considering compliment or hinder each other, instead of trusting the "label information" alone.

What is Semi-Structured Data?

Data that does not have a formal rows and columns data model of a conventional database system. This type of data is not raw or unstructured, rather the information contained in the data is organized or rationalized according to a schema of some sort. Tags or other marking mechanisms, along with attributes, identify logical and semantic pieces of information within the data, create hierarchies, fields, and so forth. JSON and XML are considered semi-structured data types. It is sometimes stated that this data represents 5% of all the data.

What is Structured Data?

Data that follows a formal data model that defines how information is stored in fields, relationships between fields of information, what information will be stored (e.g. the type of data), and rules around data input. For this reason, structured data is considered "predictable" and of great use for search, discovery, and analysis purposes. This type of data is traditionally associated with a relational database or a spreadsheet.

What is the description of the JSON NUMBER integer type?

Digits 1-9, 0, positive or negative

Why is JSON popular with developers?

From the point of view a developer, JSON has its roots in the JavaScript Programming Language (ECMA-262) and its core data structure is universal. Most object-oriented programming languages support the core elements of this data structure (more on this below). For this reason JSON is a popular data interchange format — the syntax of JSON is easy for developers to understand and use in their code because it is structurally familiar and easy to process.

Why might you want to consider NoSQL data storage when building an application that is already generating JSON documents, or managing JSON documents within an existing application?

In an operational store where data is being collected from users, systems, or social networks, a NoSQL database is the perfect JSON companion. Between its schema-free properties, its support for JSON indexing and querying, flexibility, and auto-sharding, NoSQL just makes more sense than a SQL solution.

What is the advantage of JSON being Self-Describing?

It allows applications to easily manipulate JSON data. Application objects are rich and can be easily represented in JSON format whether sparse, hierarchical, or deeply nested.

What are the constraints of a JSON name?

It can be any text string you want it to be (unless you are using a JSON Schema, but more on this later). By convention, JSON names are generally lower-case.

Why is XML sub-optimal to data interchange?

It carries a lot of baggage, and it doesn't match the data model of most programming languages.

What should be noted about the previous JSON Object?

It contains a sequence of name:value pairs, each pair separated by a comma. It is essentially a simple metadata record for a book. The name strings do not follow any particular metadata standard, they are completely made up. The values are a mix of strings and numbers. Each name:value pair in the object must be separated by a comma. Each name in the name:value pair is unique, there are no repeated name

JSON is dynamically typed, how is this appealing?

It contains no fixed data type and the attributes can vary across different documents.

How is JSON's simplicity and compactness useful?

It facilitates easy data transfer across platforms, and among a wide range of users. Part of JSON's widening appeal with developers is due to the fact that it is easy to learn, read and understand.

How does JSON compare to XML?

It is a newer semi-structured data format that is an equally easy to use, flexible standard for encoding semi-structured data. Like XML, JSON is self-describing and also has a related schema language that can be used with it (JSON Schema) and there is even a fledgling XPATH-like language for JSON called JSON Path. Like XML, JSON is human readable, can use Unicode, and is good for sharing and exchanging data. It has many of the same benefits as XML, although some of the related technologies are very new.

XML provides what two advantages as a data representation language?

It is text-based. It is position-independent.

Why has JSON been popular since its inception?

It was conceived of as a web-based technology that could be used in concert with JavaScript (JavaScript is supported by most web browsers and therefore JSON is supported by most web browsers through JavaScript).

Are JSON and XML mutually exclusive?

It's not always an either/or decision, it can be both: XML will be good for some purposes, JSON for others. Don't lock your data into a singular format, use what best addresses your requirements

4 main syntax rules: how do you follow names?

JSON data consists of name:value pairs. Each name is followed by a colon

How does JSONs popularity compare to XML?

JSON has become more popular than XML for encoding certain types of data and for processing certain types of data on the web.

How do XML and JSON compare in regard to interoperability?

JSON has the same interoperability potential as XML.

What is the best common exchange format?

JSON is a better data exchange format. XML is a better document exchange format.

XML vs JSON on Readability

JSON is arguably more human readable and easier to understand than XML. This is, in part, because of the basic JSON data structure and basic data format support mentioned above.

Why is JSON popular with non-developers?

JSON is generally easy to read. One can load a JSON file in any text editor and quickly get a sense of what kind of data the file contains and the nature of that data.

XML vs JSON in Document Data?

JSON is good for encoding basic numeric and text data formats or data requiring a simple data structure. If you are encoding rich and/or complex documents, JSON is not the right choice, you will want to stick with XML. Document structures are generally hierarchical by nature and that hierarchy can get complex fast (and may contain binary data or logic). JSON is very good choice for handling metadata, which tends to be in a key:value pair format, e.g. Metadata term:value. Generally speaking, a JSON document will be smaller and more compact than an XML document. Because of the compact nature of JSON and the simple data structure, JSON takes less bandwidth than XML when sending data across the internet and can often be processed faster than XML.

XML vs JSON - Which is more adoptable?

JSON is just beginning to become known. Its simplicity and the ease of converting XML to JSON makes JSON ultimately more adoptable.

How do XML and JSON compare in regard to human readability?

JSON is much easier for human to read than XML. It is easier to write, too. It is also easier for machines to read and write.

How do XML and JSON compare in regard to extensibility?

JSON is not extensible because it does not need to be. JSON is not a document markup language, so it is not necessary to define new tags or attributes to represent data in it.

How is JSON popular beyond the browser?

JSON is now used in many other contexts. There are even databases that use JSON as the primary storage format (e.g. MongoDB) in place of tables of data.

What is more easily processed because the structure of the data is simple and standard ?

JSON is processed more easily because its structure is simpler.

How does JSON compare to JavaScript's strictness?

JSON was created from a subset notation in JavaScript and has stricter rules than JavaScript. That said, the format greatly reduces the mismatch for developers building agile applications.

What is JSON?

JavaScript Object Notation began as a simple, lightweight data interchange and storage format for semi-structured data. It is a plain text format that is easy for humans and machines to process (read, write, parse, create).

Why is JSON preferred for simple and discreet information?

More complex types of data, like textual data, simply won't work well as JSON

What describes the JSON control character \n

Newline

What is Sharding?

Sharding is a type of database partitioning that separates very large databases the into smaller, faster, more easily managed parts called data shards. The word shard means a small part of a whole.

What describes the JSON control character \\

Solidus

What elements make up Structured Data?

Structured data that is organized in a text-based format (and stored either as simple files or in a structured datastore, such as a semantic triplestore). This encompasses semantic data in the following formats: RDF, RDFa, JSONLD

What is Structured Data Markup?

Structured data that is organized in a text-based format (and stored either as simple files or in a structured datastore, such as a semantic triplestore). This encompasses semantic data in the following formats: RDF, RDFa, JSONLD

While not ideal for data interchange, what benefits does XML have?

The benefits of interoperability and openness.

In view of the 4 main syntax rules, what must governs Objects?

They are COLLECTIONS OF DATA defined by curly braces. { .. }

What is a JSON Array?

They are unordered collections of values enclosed by [ ... ] brackets. All values in an array are separated by a comma. Array values follow the same rules as all JSON values

How must JSON BOOLEAN and NULL values be presented?

They do not require quotation marks. For example, consider the following name:value pair examples: "valid":true "valid":false "paid":null

How must JSON STRING values be presented?

They must be enclosed in double quotes, for example: "pet":"dog" "firstname":"Robert" "description":"beets, beans, "limes"

Why is NoSQL's ability to index and query across JSON an advantage?

This means accessing data in a key-value fashion, through views, and using a rich query language like N1QL. So for developers working in the enterprise application world, now is the time to look into an alternative data storage option like NoSQL, instead of stuffing JSON into a relational database. With more and more JSON data in NoSQL databases today and the need for rich, interactive applications, businesses need a way to search JSON data. By complementing NoSQL databases with search technologies, developers will have the ability to search and facet on JSON content in an application.

When should you use XML - JSON?

Use XML for generalized interchange and use JSON for the tight binding between systems sharing identical in-memory representations.

Why should you always TEST TEST TEST?

Whatever format you decide to use (XML, JSON, something else) encode a representative sample of your data and test against your use cases (yes, you should have use cases or user stories that you can refer to as you work). Make sure your data structure is descriptive enough to do the things you want to do with your data.

Why is XML good for textual data?

While It can be used for simple data models as well, you may find greater efficiencies with JSON depending on the technologies stack you are working with

How do JSON and XML provide Internationalization?

XML and JSON both use Unicode.

What would weigh in favor of using XML over JSON?

XML has long been the main choice for sharing and exchanging semi-structured data across the internet because it is a flexible standard, it can handle encoding a number of data types and formats, it is easily indexable and searchable (and there are standard methods for doing both, e.q. XPATH, XQuery), it is easily transformable into other formats (there are standard methods for doing this, e.g. XSLT), it has its own standard schema language for setting rules and requirements and describing its data.

How are JSON and XML oriented?

XML is document-oriented. JSON is data-oriented. JSON can be mapped more easily to object-oriented systems.

How do XML and JSON compare in regard to simplicity?

XML is simpler than SGML, but JSON is much simpler than XML. JSON has a much smaller grammar and maps more directly onto the data structures used in modern programming languages.

What separates the presentation of data from the structure of that data?

XML requires translating the structure of the data into a document structure. This mapping can be complicated. JSON structures are based on arrays and records. That is what data is made of. XML structures are based on elements (which can be nested), attributes (which cannot), raw content text, entities, DTDs, and other meta structures.

How are JSON and XML open and extensible?

XML's one-of-a-kind open structure allows you to add other state-of-the-art elements when needed. This means that you can always adapt your system to embrace industry-specific vocabulary. Those vocabularies can be automatically converted to JSON, making migration from XML to JSON very straightforward.

How could the previous JSON Object be nested?

{ "id": "958-0542580", "cat": { "category1": "book", "category2": "blog" }, "name": "Your Movie Sucks", "author": "Roger Ebert", "genre_s": "film", "inStock": true, "price": 12.5, "pages_i": 500 }

How is a JSON string defined?

• a sequence of zero or more Unicode characters • a backslash + a control character • a single control character

What data types can the JSON value be?

• string • number • JSON object • JSON array • boolean true • boolean false • null


Kaugnay na mga set ng pag-aaral

English File Intermediate. Unit 2A. Vocabulary - Money (pgs. 8, 154)

View Set

NUR 350 Chap 30 Hematologic Problems

View Set

02 Cancer, Thyroid Storm, Acute Renal Failure

View Set

Scrotal Masses & Inguinal Hernias, part 2

View Set

Honan, Chapter 44: Nursing Management: Patients With Oncologic Disorders of the Brain and Spinal Cord

View Set