Hacker News new | past | comments | ask | show | jobs | submit login

I mean, sure, but if you're creating an XML API, you've almost certainly defined the schema. If I take JSON like

    [
      { "fruit": "banana" },
      { "color": "yellow" },
      [ 1 ]
    ]
...and turn it into XML like...

    <document>
      <fruit>banana</fruit>
      <color>yellow</color>
      <ids>
        <id>1</id>
      </ids>
    </document>
It's going to be fairly clear what's going on.

I'd generally prefer to work with JSON, too. But the silver lining of XML is that you can define virtually any schema you want, and there are times that's conceivably going to be clearer or even more concise than the equivalent JSON.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: