Popular serialization formats
In addition to JSON, other popular serialization formats are available:
- XML
- YAML
- Apache Thrift
- Apache Avro
- Protocol Buffers
This section will provide a high-level overview of each one, as well as some key differences between these protocols.
XML
XML is one of the earliest serialization formats for web service development. It was created in 1998 and is still used in the industry, especially in enterprise applications.
XML represents data as a tree of nodes called elements. An element example would be <example>Some value</example>
. If we were to serialize our Metadata
structure, shown previously, the result would be as follows:
<Metadata><ID>123</ID><Title>The Movie 2</Title><Description>Sequel of the legendary The Movie</Description><Director>Foo Bars</Director></Metadata>
You may have noticed that the serialized XML...