Re:JSON or XML: Just Decide
by wicknicks on Thursday April 12, 2012 @08:56PM
(#3834883)
I have spent equal amounts of time with XML and JSON. Here is what my experience told me:
1] XML is painful to write.
2] Languages don't natively support it. It always requires additional drivers/libraries.
3] Its non-trivial to store XML also. With the solutions that were out there we would always run into some requirements which the database didn't support, and had to done in the business logic. JSON databases (I use Mongo) have a very clear interface, about what they support and what they don't.
4] Finally, most websites support JSON, if they don't then I resort to the XML interface. Tools like MsgPack and Google protocol buffers are great, but can only be used in house. Not over HTTP.
1] XML is painful to write.
2] Languages don't natively support it. It always requires additional drivers/libraries.
3] Its non-trivial to store XML also. With the solutions that were out there we would always run into some requirements which the database didn't support, and had to done in the business logic. JSON databases (I use Mongo) have a very clear interface, about what they support and what they don't.
4] Finally, most websites support JSON, if they don't then I resort to the XML interface. Tools like MsgPack and Google protocol buffers are great, but can only be used in house. Not over HTTP.
In short, JSON wins for me.