Re: [xml-dev] XML vs JSON

From
Ihe Onwuka <>
To
Peter Flynn <>
Date
2017-08-18T13:27:46Z
ID
<CALfs7+wDvuEPOach1oCGUKbd6wZZfd4YfOCMPyGbd=>
Thread
Re: [xml-dev] XML vs JSON
JSON is a data format 

On Fri, Aug 18, 2017 at 3:51 AM, Peter Flynn <[email protected]> wrote:

I am still looking for a volunteer author to write a few paragraphs for the XML FAQ explaining what JSON is and why one might want to use it instead of XML.

Please form an orderly queue...

///Peter


Definition is easy. Cut and pasted from JSON.org

{

JSON is built on two structures:

  • A collection of name/value pairs. In various languages, this is realized as an object, record, struct, dictionary, hash table, keyed list, or associative array.
  • An ordered list of values. In most languages, this is realized as an array, vector, list, or sequence.
These are universal data structures. Virtually all modern programming languages support them in one form or another. It makes sense that a data format that is interchangeable with programming languages also be based on these structures. 

}
The last sentence in the above definition begs a number of questions. 

1. Does it then follow that a data format should ONLY be based on those 2 structures.
2. If a data format such as XML, or RDF deals has programming language support for the data structures they deal in why should JSON supplant such formats and their usage.
3. A relational database is not a programming language and a relation is neither collection of name/value pairs nor an ordered list. So why should my relational database speak JSON.