cbor / cbor.github.io

cbor.io web site
74 stars 33 forks source link

Anchors and links within a CBOR object? #74

Closed ckaran closed 3 years ago

ckaran commented 3 years ago

I'm not sure if this is the right place for this; please tell me where to report this if it isn't.

For one of the projects I'm working on I need to be able to serialize an object graph. This is a generic directed graph that cannot be converted into a tree (something that CBOR can easily represent natively). I know that CBOR can be extended relatively easily; are there any plans to add anchors and links to the CBOR specification? Not ones that reach outside of the single CBOR-encoded byte string, but only within it, kind of like how pointers within a single flat address space only reference objects within the same address space.

I know that I can create my own tags to do this, but if someone else is already doing something along these lines I'd rather reuse their work.

EDIT

I should have dug around more. In the IANA registry, there is reference to tags 28 & 29, which are what I was looking for. Closing this issue now.