Comparison of data-serialization formats

This is a comparison of data serialization formats, various ways to convert complex objects to sequences of bits. It does not include markup languages used exclusively as document file formats.

Overview
1. The current default format is binary.

2. The "classic" format is plain text, and an XML format is also supported.

3. Theoretically possible due to abstraction, but no implementation is included.

4. The primary format is binary, but text and JSON formats are available.

5. Means that generic tools/libraries know how to encode, decode, and dereference a reference to another piece of data in the same document. A tool may require the IDL file, but no more. Excludes custom, non-standardized referencing techniques.

6. ASN.1 has X.681 (Information Object System), X.682 (Constraints), and X.683 (Parameterization) that allow for the precise specification of open types where the types of values can be identified by integers, by OIDs, etc. OIDs are a standard format for globally unique identifiers, as well as a standard notation ("absolute reference") for referencing a component of a value. For example, PKIX uses such notation in RFC 5912. With such notation (constraints on parameterized types using information object sets), generic ASN.1 tools/libraries can automatically encode/decode/resolve references within a document.

7. The primary format is binary, a json encoder is available.

8. The primary format is binary, but a text format is available.

Syntax comparison of human-readable formats
1. Omitted XML elements are commonly decoded by XML data binding tools as NULLs. Shown here is another possible encoding; XML schema does not define an encoding for this datatype.

2. The RFC CSV specification only deals with delimiters, newlines, and quote characters; it does not directly deal with serializing programming data structures.

3. The netstrings specification only deals with nested byte strings; anything else is outside the scope of the specification.

4. PHP will unserialize any floating-point number correctly, but will serialize them to their full decimal expansion. For example, 3.14 will be serialized to $3.14$.

5. XML data bindings and SOAP serialization tools provide type-safe XML serialization of programming data structures into XML. Shown are XML values that can be placed in XML elements and attributes.

6. This syntax is not compatible with the Internet-Draft, but is used by some dialects of Lisp.