gudii9
asked on
json vs xml
what are differences between json and xml. what are advantages, disadvantages of each
I read like below
please advise
I read like below
JSON uses typed objects. All XML values are typeless strings and must be parsed at runtimewhat it mean by typed object and typeless strings and runtime parsing
please advise
SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
Ditto
SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
Just again: JSON represents an object. XML is only data.
JSON objects are DTOs, so only data too. From the json.org "JSON (JavaScript Object Notation) is a lightweight data-interchange format"
So json object are no more objects than their XML counterpart. The difference between the two is simply syntax. You can even write some XSLT to transform the XML to json they are that similar.
Json is used very widely in restful services whereas XML tends to be used in traditional RPC web services.
If you are free to choose, I'd go with json as it is now more widely used and the tooling is maturing. It is more easily consumed by browsers and has a lower bandwidth requirement.
Technically, anything you can do with one can be done with the other. In some circumstances one will be easier than the other - it all depends on who your consumer is.
So json object are no more objects than their XML counterpart. The difference between the two is simply syntax. You can even write some XSLT to transform the XML to json they are that similar.
Json is used very widely in restful services whereas XML tends to be used in traditional RPC web services.
If you are free to choose, I'd go with json as it is now more widely used and the tooling is maturing. It is more easily consumed by browsers and has a lower bandwidth requirement.
Technically, anything you can do with one can be done with the other. In some circumstances one will be easier than the other - it all depends on who your consumer is.
Sorry ste5an,
Json is just formatted data.
XML is a markup language.
I even use a XML script-language in our ESB to create Webservices.
Json is just formatted data.
XML is a markup language.
I even use a XML script-language in our ESB to create Webservices.
I propose to divide the points evenly
There is not a right or wrong answer on a "what are differences" question