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 ?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
There have been big discussions about
XMLvs.JSON. Speaking in performance, there is actually no way aroundJSON. Its just so wellrecognizedby JavaScript. Parsing & Encoding is way way faster thanXML.Still, there is a right to exist for
XML. If you got very large datastructures with lots of information for instance,XMLmight 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
JSONfor server->client (javascript) data transfer.Further read: When to prefer JSON over XML?