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

Management of datatype-aware encodings #2

Open
vcharpenay opened this issue Jan 17, 2020 · 1 comment
Open

Management of datatype-aware encodings #2

vcharpenay opened this issue Jan 17, 2020 · 1 comment

Comments

@vcharpenay
Copy link
Collaborator

CBOR has a range of datatypes that subsumes that of JSON. Datatype declarations in a JSON-LD context can be leveraged to optimize serialization of typed literals.

@vcharpenay
Copy link
Collaborator Author

Example:

{
  "@value": "2019-01-17T10:38:33Z",
  "@type": "xsd:dateTime"
}

would be encoded as a CBOR map with 2 key/value pairs while it could also be encoded as the positive integer 1579257513 tagged item with semantic tag 1 (POSIX timestamp).

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