xml vs json

Download Xml vs json

If you can't read please download the document

Upload: ivoelenchev

Post on 18-Aug-2015

21 views

Category:

Data & Analytics


0 download

TRANSCRIPT

  1. 1. XML vs JSON
  2. 2. XML 1996; 19 years ago Document Type Definition XML Schema XML Schematron
  3. 3. JSON: The Fat-Free Alternative 1999; 16 years JSON Schema
  4. 4. Size matters
  5. 5. Shape matters
  6. 6. Methodology Base root with 3 properties Books 600 books in 300 categories EPA geospatial data Twitter twitter search results
  7. 7. Formats Used JSON1 simple json JSON2 minified XML1 simple xml XML2 minified xml XML3 all non-repeating children as attributes
  8. 8. Browsers
  9. 9. XML and JSON size
  10. 10. GZIP size
  11. 11. Parsing Methods JSON JSON parsing with eval eval('(' + responseString + ')'); JSON parsing with Jquery $wnd.jQuery.parseJSON( responseString );
  12. 12. Parsing Methods XML Native parser parser=new DOMParser(); xmlDoc=parser.parseFromString(responseStri ng,"text/xml"); Jquery parser $wnd.jQuery.parseXML( responseString );
  13. 13. Native Parsing
  14. 14. Jquery parsing
  15. 15. Total Time (Native)
  16. 16. Total Time (JQuery)
  17. 17. Total Time (per browser)
  18. 18. Conclusion JSON is lighter JSON is faster Properly formatted XML is just a tad bigger than JSON