Annotated Streams and Embedded Schemas
With the Serialization package, you can build self-describing serialized data known as embedded schemas. The package supports annotated streams, where the name of each object precedes the value of that object in the stream. Annotated streams include enough meta-information (schema) to process objects of unknown types using generic code, while preserving the original object’s structure.
When an object is output to an object stream, the streamContents() function for that object makes a series of calls on the object stream to save the object’s state. Besides state information, these calls include information about the object, such as the names of the fields. Specific object streams may either ignore this information or include it in their output. A stream that includes this information is known as an annotated stream.