digitalbazaar / cborld

A Javascript CBOR-LD processor for web browsers and Node.js apps.
https://json-ld.github.io/cbor-ld-spec/
BSD 3-Clause "New" or "Revised" License
16 stars 12 forks source link

Consider lazy assignment of terms to IDs, based on presence in payload #81

Open dlongley opened 1 month ago

dlongley commented 1 month ago

If we are able to assign terms to IDs based on their presence in the payload, then large contexts with many (potentially unused) terms will not use up smaller ID space and any future additions to existing contexts (despite it being best practice not to change well-versioned contexts) would not change the CBOR-LD encoding of an existing payload.

This approach would probably need a new header to indicate the different way of assigning term IDs for backwards compatibility.