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 purpos...