Avatar of gudii9
gudii9Flag for United States of America

asked on 

json vs xml

what are differences between json and xml. what are advantages, disadvantages of each

I read like below
JSON uses typed objects. All XML values are typeless strings and must be parsed at runtime
what it mean by typed object and typeless strings and runtime parsing

please advise
Web Development.NET ProgrammingJavaScriptXMLJSON

Avatar of undefined
Last Comment
Theo Kouwenhoven
SOLUTION
Avatar of ethoths
ethoths

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
SOLUTION
Avatar of ste5an
ste5an
Flag of Germany image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
Avatar of ethoths
ethoths

Ditto
SOLUTION
Avatar of David Favor
David Favor
Flag of United States of America image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
SOLUTION
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
ASKER CERTIFIED SOLUTION
Avatar of leakim971
leakim971
Flag of Guadeloupe image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
Avatar of ste5an
ste5an
Flag of Germany image

Just again: JSON represents an object. XML is only data.
Avatar of ethoths
ethoths

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.
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.
I propose to divide the points evenly
There is not a right or wrong answer on a "what are differences" question
.NET Programming
.NET Programming

The .NET Framework is not specific to any one programming language; rather, it includes a library of functions that allows developers to rapidly build applications. Several supported languages include C#, VB.NET, C++ or ASP.NET.

137K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo