-
Notifications
You must be signed in to change notification settings - Fork 18
Rationale
Fressian is designed to communicate values in a way that is:
- self-describing
- schema-free
- extensible
- batteries-included
- binary
- efficient
Each of these is elaborated below.
Fressian is a byte-code driven format. The byte codes describe the primitive types, and provide a tagging mechanism so that extensions can describe themselves in terms of primitives and other extensions.
Because fressian is self-describing, there is no separate schema language, in or out of band. Readers do not need any additional information in order to be able to read any message. There is no in-band schema overhead for small messages.
Writers can register new, named types, which are built recursively atop existing types. There are no object or reference types, only data values. Readers can register handlers that are driven by the type name to produce whatever data type they want locally. Readers can always read types in a generic way, even if they do not provide a handler.
Fressian includes a rich set of built-in types. In addition to the usual primitive types and collections, there are also
- sets
- two symbolic name types
- UUIDs
- instants in time
- platform primitive arrays
- URIs
Fressian is binary, and can efficiently represent both textual and binary data.
Fressian is designed for efficient serialization and deserialization, and for compact size representation, but without compromising on any of the goals listed above. Of particular interest is Fressian's support for domain-specific compression.