We’ve all probably seen the debates. Forums abound with web developers touting the pros of their preferred data structure while burning the other in effigy. What’s difficult to find in the sea of rhetoric is the actual answer. So we must ask ourselves, is there even an answer? Is one structure truly better than the other. Well as the tootsie roll pop owl said, let’s find out.
First, let’s discuss XML. XML (Extensible Markup Language) was endorsed by WC3 in early 1998, giving it the leg up on age. That age has given it the advantage of being widely utilized and accessible. Another plus for XML is it’s readability. A person with little to no understanding of data structures can look at an XML object and make safe assumptions as to it’s meaning. Finally, XML has multiple frameworks associated with it as well as being used by nearly 80% of the online APIs available.
Perhaps, however, I am not the owl with the answer in this case but the crotchety old turtle telling you to look somewhere else. Like maybe the current trends in web development. As of mid 2011, 20% of the API’s were using strictly JSON. This may not seem that high but when you consider this is up from less than 5% only 3 years prior it’s impressive. The fact is that JSON is preferred by web developers and those who offer APIs want to cater to those web developers. But then again, we could be wrong. After all, we all know that owl was just a sugar crazed scammer.