jsonld-expandable
The Expandable derive macro: it generates expanded JSON-LD straight from your own Rust structs, with no intermediate serde_json::Value and no context processing at runtime. Field attributes cover @id, @type, typed and IRI coercions, list, set, language and index containers, nesting, flattening and more.
let doc: Value = sensor.expand;
This crate is the proc-macro shell. The traits the generated code calls live in jsonld-expandable-core, and one of the two has to be a dependency of the crate that derives: either the umbrella jsonld with an expandable feature, which re-exports both, or jsonld-expandable-core directly. The derive reads your manifest to work out which, and follows a renamed dependency to the name you gave it.
The full attribute reference is in the derive's documentation.
Status: experimental. Version numbers move fast and there is no compatibility promise before 1.0. The workspace README says what that means in practice.
License
Dual-licensed, same as upstream. Pick whichever fits: