[GeoJSON] <religious-war>size matters</religious-war>
Geoff Hendrey
ghendrey at decarta.com
Thu Mar 15 08:28:35 PDT 2007
Here is some interesting background/debunking on the myth of JSON
compactness vs. XML verbosity.
This is an excerpt from an email I sent to a colleague early last year:
========================================================================
=======
I went to the json "see for yourself" page:
http://www.json.org/example.html
<BLOCKED::http://www.json.org/example.html> to compare the Json
equivalent of XML.
I copied each of the examples into notepad and wrote down the size-on
disk:
json size (bytes) XML size (bytes) (json size)/(XML
size)
===================================================
604 630 95%
252 221 114%
630 656 96%
3554 10708 33%
898 1150 78%
AVG (json size)/(XML size)
=====================
83.2%
Based on an average size compaction to 83.2% of the XML size. Also, if
you look at the 4th example they give (line 4 of the table above), they
did a Json version of web.xml. Now web.xml is a notoriously bad XML
design. It basically doesn't use ANY attributes, so you get pretty nasty
tag bloat. So if we drop the 4th comparison, as being kinda silly, we
get an average compaction to 95.4% of the original size. Is saving 4.5%
really a big advantage?
I also saw several statements on the json web page that I would put in
the "wacky" bin. This may just be personal preference, but I found the
XML documents much easier to read than their json equivalents. The Json
looks, to me, like "code", kinda like a snippet of PERL or something.
<geeky>
Anyway, it seems clear that being able to easily marshal an object
representation of your data makes it much easier to develop software in
any programming language. But it seems to me that json is munging this
idea up with the wire format, which to me are orthogonal concerns.
</geeky>
Geoff Hendrey
Software Architect
deCarta
Four North Second Street, Suite 950
San Jose, CA 95113
office 408.625.3522
www.decarta.com <blocked::http://www.decarta.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.geojson.org/pipermail/geojson-geojson.org/attachments/20070315/1fea38fe/attachment.htm>
More information about the GeoJSON
mailing list