3 ms·
> Most browsers can display XML readably by default. True, but a JSON string is already more readable than XML. If you open your devtools it's inspectable by
by kowdermeister 10y ago
> Most browsers can display XML readably by default.
True, but a JSON string is already more readable than XML.
If you open your devtools it's inspectable by default: http://imgur.com/a/eW0Rv http://imgur.com/a/eW0Rv
> that's not quite the case for languages like C++ or Haskell.
So handling XML in those languages are easier?
BTW if your server / services feel more native with XML serialization / parsing to native data structures use that. Picking JSON just because everybody else does it is not a good idea.
However if you make a public web API consumed mostly by browsers (JS), then yeah, pick JSON and REST.
- masklinn 10y ago> If you open your devtools it's inspectable by default: http://imgur.com/a/eW0Rv http://imgur.com/a/eW0Rv That also works for XML documents: http://i.imgur.com/NmcWdaO.png http://i.imgur.com/NmcWdaO.png > So handling XML in those languages are easier? Both are "crap" since they're dynamic information which has to be brought into a statically typed world. However depending on the schema it might be possible to automatically generate the binding and hide the dynamic resolution. > BTW if your server / services feel more native with XML serialization / parsing to native data structures use that. Picking JSON just because everybody else does it is not a good idea. > However if you make a public web API consumed mostly by browsers (JS), then yeah, pick JSON and REST. Agreed.