Posts

Showing posts from February, 2021

Beyond JSON – Alternates

 Previous - Beyond JSON – The Dominance When you want to write data to a file or send it over the network, you have to encode it as some kind of self-contained sequence of bytes (for example, a JSON document). Since a pointer would not make sense to any other process, this sequence-of-bytes representation looks quite different from the data structures that are normally used in memory. Thus, we need some kind of translation between the two representations. The translation from the in-memory representation to a byte sequence is called encoding (also known as serialization or marshalling), and the reverse is called decoding (parsing, deserialization, unmarshalling). Most of the programing languages have built in encoding libraries for encoding in-memory objects (JAVA:java.io.serializable, Ruby:Marshal etc.). But the issue with them is that the encoding is language specific. It’s generally a bad idea to use your language’s built-in encoding for anything other than very transient purposes.

Beyond JSON – The Dominance

Image
 Previous - Beyond JSON - The Emergence By 2010, there were many JSON parsing libraries available and JSON kept gaining the popularity amongst data exchange formats. As the below graph clearly shows that JSON surpassed the popularity of XML by around 2012. The big push came with the adoption of REST architectural style along with the AJAX based frameworks like Ruby on Rails. The JavaScript  frameworks like Angular (courtesy Google in 2009) and React (courtesy Facebook 2013) acted as the catalyst to the acceptance and adoption of JSON as natural choice for data exchange. As the UI frameworks are so JavaScript heavy that JSON did fit the paradigm very well. We have been able to manage the user experience through the UI reactive frameworks. Also, one of the important consideration was the testability of JSON data dependent UI. Designers / Front End developer can independently test UI with a high level of accuracy JSON being a human readable, text based data format. Below reasons helped