Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Have a dedicated semantic tag for JSON documents #5

Open
pchampin opened this issue Feb 14, 2020 · 0 comments
Open

Have a dedicated semantic tag for JSON documents #5

pchampin opened this issue Feb 14, 2020 · 0 comments

Comments

@pchampin
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Non TR Work
Development

No branches or pull requests

1 participant