Skip to main content

Crate cbor_ld

Crate cbor_ld 

Source
Expand description

A Rust CBOR-LD 1.0 processor.

The implementation follows the W3C CBOR-LD 1.0 tag structure 51997([registryEntryId, payload]) and uses cbor2::Value as the dynamic JSON-LD / CBOR-LD data model. Registry entry 0 is encoded without semantic compression; all other registry IDs use the default CBOR-LD semantic compression algorithms with caller-provided registry type tables.

Structs§

DecodeOptions
Options for CBOR-LD to JSON-LD decoding.
EncodeOptions
Options for JSON-LD to CBOR-LD encoding.
TypeTable
A CBOR-LD registry type table.

Enums§

Error
Errors returned by the CBOR-LD processor.
TableKey
A primitive value key used in a CBOR-LD type table.

Constants§

CBOR_LD_TAG
The CBOR-LD 1.0 semantic tag, 0xcb1d.

Functions§

decode
Decodes CBOR-LD bytes into a JSON-LD document.
decode_with_loader
Decodes CBOR-LD bytes into a JSON-LD document with a document loader.
encode
Encodes a JSON-LD document as CBOR-LD.
encode_with_loader
Encodes a JSON-LD document as CBOR-LD with a document loader.

Type Aliases§

Result
A result type returned by this crate.