jsonld-compaction 0.23.0

JSON-LD document compaction implementation
Documentation

jsonld-compaction

Crate Docs MSRV License

The JSON-LD compaction algorithms. Compaction turns an expanded document back into the terse shape a @context describes: IRIs become terms or compact IRIs, single-element arrays collapse, and value objects reduce to plain JSON scalars wherever the context makes that lossless.

A whole document can be compacted at once, embedding the context it was compacted against, or a single fragment can be compacted on its own.

Part of jsonld, a JSON-LD 1.1 implementation for Rust, which is what you usually want.

Status: experimental. Version numbers move fast and there is no compatibility promise before 1.0. The workspace README says what that means in practice.

Feature flags

Flag Default Enables
bytewise-iri yes byte-wise IRI comparison, hashing and ordering in iri-rs

License

Dual-licensed, same as upstream. Pick whichever fits: