dbTalk Databases Forums  

Following up on the good argument for XML thread, JSON is simpler and more space efficient, and seems to be catching on as a data interchange format!

comp.databases.theory comp.databases.theory


Discuss Following up on the good argument for XML thread, JSON is simpler and more space efficient, and seems to be catching on as a data interchange format! in the comp.databases.theory forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Casey Hawthorne
 
Posts: n/a

Default Following up on the good argument for XML thread, JSON is simpler and more space efficient, and seems to be catching on as a data interchange format! - 11-19-2009 , 05:59 PM






From: http://www.json.org/

JSON (JavaScript Object Notation) is a lightweight data-interchange
format. It is easy for humans to read and write. It is easy for
machines to parse and generate. It is based on a subset of the
JavaScript Programming Language, Standard ECMA-262 3rd Edition -
December 1999. JSON is a text format that is completely language
independent but uses conventions that are familiar to programmers of
the C-family of languages, including C, C++, C#, Java, JavaScript,
Perl, Python, and many others. These properties make JSON an ideal
data-interchange language.

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 interchangable with programming languages also be
based on these structures.

-------------------------------------------------------------------------------------

I wonder what the trade-offs are between JSON, XML, and other data
interchange formats.
--
Regards,
Casey

Reply With Quote
  #2  
Old   
Ben Finney
 
Posts: n/a

Default Re: Following up on the good argument for XML thread, JSON is simpler and more space efficient, and seems to be catching on as a data interchange format! - 11-19-2009 , 06:13 PM






Casey Hawthorne <caseyhHAMMER_TIME (AT) istar (DOT) ca> writes:

Quote:
I wonder what the trade-offs are between JSON, XML, and other data
interchange formats.
I've found many programmers using YAML <URL:http://www.yaml.org/> as
having the same advantages of JSON, with broad support in language
libraries, while being even closer to human-readable representation of
structure.

--
\ “A free press is one where it's okay to state the conclusion |
`\ you're led to by the evidence.” —Bill Moyers |
_o__) |
Ben Finney

Reply With Quote
  #3  
Old   
Casey Hawthorne
 
Posts: n/a

Default Re: Following up on the good argument for XML thread, JSON is simpler and more space efficient, and seems to be catching on as a data interchange format! - 11-19-2009 , 07:04 PM



Thank you for the prompt response.

On Fri, 20 Nov 2009 10:13:26 +1100, Ben Finney
<bignose+hates-spam (AT) benfinney (DOT) id.au> wrote:

Quote:
Casey Hawthorne <caseyhHAMMER_TIME (AT) istar (DOT) ca> writes:

I wonder what the trade-offs are between JSON, XML, and other data
interchange formats.

I've found many programmers using YAML <URL:http://www.yaml.org/> as
having the same advantages of JSON, with broad support in language
libraries, while being even closer to human-readable representation of
structure.
--
Regards,
Casey

Reply With Quote
  #4  
Old   
Ben Finney
 
Posts: n/a

Default Re: Following up on the good argument for XML thread, JSON is simpler and more space efficient, and seems to be catching on as a data interchange format! - 11-19-2009 , 07:19 PM



Ben Finney <bignose+hates-spam (AT) benfinney (DOT) id.au> writes:

Quote:
Casey Hawthorne <caseyhHAMMER_TIME (AT) istar (DOT) ca> writes:

I wonder what the trade-offs are between JSON, XML, and other data
interchange formats.

I've found many programmers using YAML <URL:http://www.yaml.org/
The specification for YAML acknowledges prior art
<URL:http://www.yaml.org/spec/1.2/spec.html#id2708710> and even
discusses comparisons with JSON and XML
<URL:http://www.yaml.org/spec/1.2/spec.html#id2759572>
<URL:http://www.yaml.org/spec/1.2/spec.html#id2759732>.

--
\ “Value your freedom or you will lose it, teaches history. |
`\ “Don't bother us with politics,” respond those who don't want |
_o__) to learn.” —Richard Stallman, 2002 |
Ben Finney

Reply With Quote
  #5  
Old   
rpost
 
Posts: n/a

Default Re: Following up on the good argument for XML thread, JSON is simpler and more space efficient, and seems to be catching on as a data interchange format! - 11-20-2009 , 03:25 PM



Casey Hawthorne wrote:

Quote:
I wonder what the trade-offs are between JSON, XML, and other data
interchange formats.
Clearly, JSON's syntax is simpler than XML's. For mere compactness,
something binary like Google Protocol Buffers is better.

XML has the advantage of coming with popular additional standards
for data manipulation and validation: XPath, XQuery, XML Schema, etc.

Quote:
--
Regards,
Casey
--
Reinier

Reply With Quote
  #6  
Old   
Clifford Heath
 
Posts: n/a

Default Re: Following up on the good argument for XML thread, JSON is simplerand more space efficient, and seems to be catching on as a data interchangeformat! - 11-26-2009 , 08:35 PM



Ben Finney wrote:
Quote:
Casey Hawthorne <caseyhHAMMER_TIME (AT) istar (DOT) ca> writes:
I wonder what the trade-offs are between JSON, XML, and other data
interchange formats.
I've found many programmers using YAML <URL:http://www.yaml.org/
I've used all three, and still find them all wanting.
None supports binary data well. JSON doesn't support
back-references (for use in marshalling object graphs
with recurrences), and at least the Ruby implementation
of YAML has catastrophic bugs in its recurrence handling,
where it declares false back-referecces.

YAML is fragile to white-space manipulation, for example
when sent as an email attachment.

ASN.1 encodings are robust, but not human-readable.

Clifford Heath.

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.