I have a question about so called best practices. From the experience of Backbase R&D and especially PS departments, what are the pros and contras of using XML vs. JSON for transferring data between server and client?
What are the characteristics of the situations when you would prefer one over another?
best,
mr.woolf.

No comments on my
21 February, 2008 - 13:29 — Mr.WoolfNo comments on my question?
Is there anybody in this forum who has experience with this issue or who have thought about it?
XML vs JSON
21 February, 2008 - 22:30 — andysXML and JSON are represented as data structure. Both of them has their own uses, advantages, and disadvantages.
If you want to compare it, or if you want to decide when you should use JSON or XML, you need to specify the purpose of yours first.
XML
* It works better if we want to display the data in a good and readable format, It is more intuitive to be understood and to be read
* It can be used in every environment, not limited to Javascript
* It is used for exchanging data between enterprise application which using Web Service technology.
* It does not support arrays
* XML is slow because the XMLDOM is needed to parse the returned string and convert it to an XML Object,
JSON
* JSON is easier to be implemented
* JSON is meaningless compare to the readable format of XML
* It supports array
* JSON is only used in Javascript environment
Hi andy, Thanks for the
24 February, 2008 - 18:42 — Mr.WoolfHi andy,
Thanks for the structured reply indeed!
I have had similar points and I would like to add my five cents here as well.
XML
* It does support lists of similar objects. And the list structure is a generalization of arrays. At the same time I can understand your point, because XML does not have arrays in a way we know them from imperative languages or, if you wish, on computers with van Neumann architecture.
JSON
* Less secure, because can directly evaluate harmful code
* representation is more compact
Who is the next :)