30
lumy
68d

Is it me or all REST api use json today ?
And xml is kinda dead ?

I always feel awful when I see an xml rest api.

Comments
  • 12
    JSON is a lot easier to work with, especially in JS (since it's pretty much native to JS), so it seems natural to go with it instead of others like XML.

    On a semi related note it seem like YAML is getting more and more popular
  • 5
    unfortunately xml in apis is still widely used πŸ˜’
  • 11
    Xml have a huge avantage over JSON: the DTDs, hence builtin format and rules dataset validation.

    If you're building small tools for yourself, starting from trusted endpoints json kinda works, but if you need security without reinventing the wheel, xml is a togo
  • 0
    I'm not quit sure what to answer.

    I guess most of the company using json may have rework on the wheel.
  • 12
    I’ve seen APIs that return data on csv. I cried.
  • 1
    @cabrasm πŸ˜†
  • 7
    @Artemix Very good point. I really hate having to deal with XML APIs, but that's a very good reason to do it anyway, I have to admit.
  • 5
    @cabrasm okay i'm not gonna complain again of xml in REST API.

    That's very hard to see !
  • 0
    πŸ“Œ
  • 6
    @AlexDeLarge I've always had this feeling that XML was ugly and hard to work with, but for functional tests, I simply had to match my API results against the DTDs I did, it was so simple I fell again in love
  • 2
    Some third party website still uses XML and working with XML makes me sickπŸ˜₯
  • 0
    XML is slow, but is still tool used other places that the internet
  • 1
    Everytime I have to use XML I cry and then convert that to JSON.
  • 2
    It does seem like JSON is the ubiquitous option. I prefer it myself.

    In larger systems, and especially distributed systems, one mature option is protocol buffers (also called protobufs). The data serialized across the wire is defined in a language-specific interface, so it’s statically typed and you don’t need a DTD. Used correctly, they easily allow for rolling deployment and backwards compatibility.
  • 0
    πŸ“Œ
Your Job Suck?
Get a Better Job
Add Comment