spruceid / treeldr

https://www.spruceid.dev/treeldr/treeldr-overview
Apache License 2.0
26 stars 3 forks source link

Allow arbitrary record fields #179

Open timothee-haudebourg opened 6 months ago

timothee-haudebourg commented 6 months ago

Currently record fields (map keys) can only be text strings. This is consistent with JSON's data model, but not with many other data-model that allow arbitrary map keys, such as CBOR. There is no inherent limitation to TreeLDR's layout that would forbid non-string keys.

That being said, the only concrete syntax available to define TreeLDR layouts today is JSON. So even if we allow non-string keys, we would have no way of defining a layout accepting non-string keys with the JSON syntax.

timothee-haudebourg commented 6 months ago

I've added non-string keys in the tree data model. However there's still the JSON syntax issue. It could be solved by just using another syntax for layouts, like CBOR or RON.