Does anyone know when XML should be used instead of JSON and why?
Thanks
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.
XML – pros
XML – cons
<some_long_tag_name>...</some_long_tag_name>ecountered x1000 times in one file) which can have huge impact on network bandwith and disk usageJSON – pros
Easier to read by humans
Native support in web browsers thanks to
JavaScriptJSON – cons
Doesn’t contain type definition (
"some_object" : "10" // String or Int?)Lack of some sort of DTD (how can you tell that “some_object” is required?)
These are just major ones. Honestly one could write a book about it, so I don’t wonder whay are people downgrading this question… However I found appropriate to help you out a little.