SP API... why not have a response format choice, i.e. XML or JSON?


#1

I’m just wondering on this point. The input format isn’t the issue - JSON or XML. Fine just have one.

But… why wouldn’t the API offer a choice of response formats… i.e. output in either XML or JSON? It would seem fairly easy to generate from the server side, especially when limited fields anyway? Whereas trying to subsequently translate between JSON and XML isn’t quite so easy.

I cannot help but think, some integrations might struggle to move to JSON.


#2

Most code bases have a JSON serialization/deserialization already build in or a library to do so. In my experience it is the preferred way of serialization/deserialization objects.


#3

JSON won the battle. QED. It is far easier to do systems interop using JSON serialization vs. XML.