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