Download presentation
Presentation is loading. Please wait.
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
Methodology Base – root with 3 properties
Books – 600 books in 300 categories EPA – geospatial data Twitter – twitter search results
5
Formats Used JSON1 – simple json JSON2 – minified XML1 – simple xml
XML2 – minified xml XML3 – all non-repeating children as attributes
6
Browsers
7
XML and JSON size
8
GZIP size
9
Parsing Methods JSON JSON parsing with eval
eval('(' + responseString + ')'); JSON parsing with Jquery $wnd.jQuery.parseJSON( responseString );
10
Parsing Methods XML Native parser
parser=new DOMParser(); xmlDoc=parser.parseFromString(responseStri ng,"text/xml"); Jquery parser $wnd.jQuery.parseXML( responseString );
11
Native Parsing
12
Jquery parsing
13
Total Time (Native)
14
Total Time (JQuery)
15
Total Time (per browser)
16
Conclusion JSON is lighter JSON is faster
Properly formatted XML is just a tad bigger than JSON
Similar presentations
© 2025 SlidePlayer.com Inc.
All rights reserved.