cargo add preserves
This crate (
preserves on crates.io) implements
Preserves for Rust. It provides the core
semantics as well as both the human-readable
text syntax (a superset of JSON) and machine-oriented binary
canonicalization) for Preserves.
This crate is the foundation for others such as
preserves-schema, which implements Preserves Schema;
preserves-path, which implements Preserves Path; and
preserves-tools, which provides command-line utilities for working with Preserves, in particular
preserves-tool, a kind of Preserves Swiss-army knife.
Preserves is a data model, with associated serialization formats.
It supports records with user-defined labels, embedded references, and the usual suite of atomic and compound data types, including binary data as a distinct type from text strings. Its annotations allow separation of data from metadata such as comments, trace information, and provenance information.
Preserves departs from many other data languages in defining how to compare two values. Comparison is based on the data model, not on syntax or on data structures of any particular implementation language.
- Support for Serde deserialization of Preserves terms described by Rust data types.
- Serde and plain-Preserves codec errors.
- Utilities for producing and flexibly parsing strings containing hexadecimal binary data.
- Support for Serde serialization of Rust data types into Preserves terms.
- Serde support for serializing Rust collections as Preserves sets.
- Serde support for serializing Rust data as Preserves symbols.
- Representing, reading, and writing Preserves
Values as Rust data
- Convenience syntax for efficiently constructing Preserves record values.