Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Which one is efficient JSON or XML in case of Server client J2EE applications?

Tags:

json

jquery

xml

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 ?

like image 732
Puru Avatar asked Dec 28 '25 16:12

Puru


1 Answers

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: When to prefer JSON over XML?

like image 192
jAndy Avatar answered Dec 31 '25 18:12

jAndy



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!