Which is Best XML or JSON in HTTPrequest

Posted by Vipinpaliwal under Regular Expressions on 8/31/2009 | Views : 1828 | Status : [Member] | Replies : 3
Hi All,

Please advice me which is best option (XML or JSON) to get data from HTTP request



Thanks




Responses

Posted by: Lakhangarg on: 8/31/2009 [Member] [Moderator] Silver

Up
0
Down
HI-
i think XML is Better, it is more secure, as JSON is easy for humans to read and write.
Thanks & Regards
Lakhan Pal Garg
http://lakhangarg.blogspot.com/


Vipinpaliwal, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Lakhangarg on: 9/1/2009 [Member] [Moderator] Silver

Up
0
Down
sorry for last reply --

JSON is easy to understand and write as comapred to XML:
Again, when you're writing ajax stuff, which looks easier? the XML approach or the JSON approach:
The XML approach:

1. bring back an XML document
2. loop through it, extracting values from it
3. do something with those values, etc,

versus
The JSON approach:

1. bring back a JSON string.
2. 'eval' the JSON

for more details Visit:
http://www.secretgeek.net/json_3mins.asp

Vipinpaliwal, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Rtpharry on: 9/3/2009 [Member] [MVP] Bronze

Up
0
Down
The reason that JSON has gained so much popularity is that it browsers did not have good performance with xml.

Trying to turn the xml back into javascript datastructures takes a lot more cpu power than json does.

This is something that is performed on the clients computer so it means their computer goes slowly and it also means you dont have a way around it.

Therefore i think that json is better than xml.

Vipinpaliwal, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response