Open vcharpenay opened 4 years ago
Perhaps transformations like this are out of scope for basic CBOR serialization? They produce the same semantic data, but a JSON to "optimized" CBOR to JSON round trip would not result in equivalent JSON structures. I'm not sure where these algorithms should be developed. Maybe something to add to the best practices doc. Some transformations may be serialization specific too. In any case, I imagine using these should be optional.
I think this note can cover two kinds of thing:
Those are indeed two different problems, which should be presented separately, but I think both are in scope. Note that #1 also relates to the second category.
I wrote some stuff down about context-based optimization experiments we've done over the past couple of years at Digital Bazaar: https://github.com/w3c/json-ld-cbor/issues/6
Some recurrent patterns within a JSON-LD documents could be summarized as a context entry and serialized in a more compact way using a local context.
E.g.
is equivalent to: