From fully managed EDI solutions to supply chain consulting.

Who Wins the Popularity Contest? XML or JSON?

Topics: , , , , , ,
Photo appears courtesy of the Auburn Alumni Association.

One of our ERP partners asked an interesting question the other day.  He asked if he should start developing his maps to be sent in JSON instead of XML.  He felt that JSON was more popular than XML.  That started us thinking about this as we have been asked to do a lot of XML mapping lately, but not much JSON.

According to Wikipedia, XML (Extensible Markup Language) is a markup language that defines a set of rules for encoding documents in a format that is both human-readable and machine-readable. It is defined by the W3C’s XML 1.0 Specification and by several other related specifications, all of which are free open standards.

Wikipedia says JSON (JavaScript Object Notation) is an open standard format that uses human-readable text to transmit data objects consisting of attribute-value pairs. It is used primarily to transmit data between a server and web application, as an alternative to XML.

So why use one over the other?  A number of posts can be found on the web touting the advantages of JSON over XML.  One post calls JSON the “fat-free” alternative to XML due to its smaller grammar set (it is less verbose).  JSON also maps more directly onto the data structures used in modern programming languages.

Both XML and JSON are used in Ajax techniques. Ajax is a term for the ability of a webpage to request new data after it has loaded into the web browser, usually in response to user actions on the displayed webpage. As part of the Ajax model, the new data is usually incorporated into the user interface display dynamically the moment it arrives back from the server. For example, when the user is typing into a search box, client-side code sends what they type to a server that will respond with a possible list of items from its database. These might be displayed in a drop-down list beneath the search box. The user may then stop typing and select the relevant string directly. When it was originally implemented, Ajax commonly used XML as the data interchange format. Now many developers use JSON to pass the Ajax updates between the server and the client as it is faster and more efficient.

Numerous ERP packages (Oracle for example) currently use XML for importing and exporting integration data.  Making a change to using JSON would take a lot of time and effort on their part.

So while the popularity of JSON is high (we have never heard anyone say they really like XML), XML is still used more than JSON.  However, to keep current, we all need to know both as JSON is being used by many developers when creating APIs and data exchange sets.

We would be interested in hearing from you if you have some thoughts in this area.

Learn more about the relationship between ERP providers and EDI partnerships in our free whitepaper: EDI Partnerships Deliver Value to ERP Solutions Providers

5 Questions to Ask Yourself Before You Integrate Your EDI
The Need for Speed: Software, Hardware and Everything In Between

This article was written by:

Related Posts

Contact GraceBlood—we’re here to help.