[X3D-Public] MultiUser Q. state package using XML vs. JSON
cbullard at hiwaay.net
cbullard at hiwaay.net
Fri May 25 06:23:07 PDT 2012
If you are transferring value pairs or a reasonably flat list of
values, JSON is better. State packages usually fall into that space.
XML is better when you have to transfer complex content, mixed
content, etc., and when you need to extract and reuse the data into
multiple applications. There are many applications for which JSON
would not only not be appropriate, it can't do it. XML can do all of
them but no size fits all comfortably.
This was a serious mistake when XML was fielded: saying it was for
"bits on the wire". It is typically too heavy for that. For complex
bits on the wire or from system to system, it is the way to go (say
technical manuals).
Just be wary of premature optimization. Be sure that compact size
really is the optimization goal that chews up performance.
len
Quoting Sven-Erik Tiberg <Sven-Erik.Tiberg at ltu.se>:
> Hi
>
> We are planning to transfere states between X3D clients using XML or
> shold we look at JSON http://json.org/ .
> We will use gzip for compressing state packages.
>
> Does't seems to descreese the package size using JSON but IMHO JSON
> package are easier to read.
>
> Any comments?
>
> /Sven-Erik Tiberg
> Lulea Univ of Technology / Sweden
>
>
More information about the X3D-Public
mailing list