Saturday, May 16, 2015

XML vs JSON

XML is heavily formatted.  The tag to data ratio can be quite high.  Data can be encoded between tag or as attribute of a tag.  Parsing the data from XML required knowledge of the layer and quite an amount of coding.

JSON on the other head encode the data a Javascript array format in a string representation.  JSON file can be converted to a Javascript array object easily using eval() call in Javascript.

No comments: