Skip to content

Have a dedicated semantic tag for JSON documents #5

@pchampin

Description

@pchampin

Typically, a JSON-LD document is a JSON object, which naturally maps to a CBOR map.

But unlike JSON, CBOR allows non-strings as keys of a map. Since JSON-LD has a number of recurring keys (the keywords), space could be saved by conventionally encode these with a shorter type (a 1-bytes integer would be enough).

E.g., we could decide that 1 means @context, 2 means @type, etc.

In order to make this convention explicit, it would be cleaner to prefix this top-level map with a dedicated CBOR semantic tag.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Non TR Work

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions