I am using Jquery in my J2EE application. I am still using XML to get pass and get the data from the server. My client side code is very vague to see. Is it better to move from XML to JSON ?
views:
36answers:
1
+5
A:
There have been big discussions about XML
vs. JSON
. Speaking in performance, there is actually no way around JSON
. Its just so well recognized
by JavaScript. Parsing & Encoding is way way faster than XML
.
Still, there is a right to exist for XML
. If you got very large datastructures with lots of information for instance, XML
might be a better choice.
So I think it really depends on what kind of data structure you want to transfer, but in general, I'd always prefer JSON
for server->client (javascript) data transfer.
Further read: http://stackoverflow.com/questions/325085/when-to-prefer-json-over-xml
jAndy
2010-06-17 05:52:46