Skip to main content

encode

Function encode 

Source
pub fn encode(
    jsonld_document: &Value,
    options: EncodeOptions<'_>,
) -> Result<Vec<u8>>
Expand description

Encodes a JSON-LD document as CBOR-LD.

This helper works without a document loader and is sufficient for uncompressed documents or compressed documents that only use inline contexts. Use encode_with_loader when remote context URLs are present.