[GeoJSON] <religious-war>size matters</religious-war>
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:
<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
json size (bytes) XML size (bytes) (json size)/(XML
604 630 95%
252 221 114%
630 656 96%
3554 10708 33%
898 1150 78%
AVG (json size)/(XML size)
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.
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.
Four North Second Street, Suite 950
San Jose, CA 95113
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the GeoJSON