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

Allow arbitrary record fields #179

Open
timothee-haudebourg opened this issue Apr 5, 2024 · 1 comment
Open

Allow arbitrary record fields #179

timothee-haudebourg opened this issue Apr 5, 2024 · 1 comment
Assignees

Comments

@timothee-haudebourg
Copy link
Collaborator

timothee-haudebourg commented Apr 5, 2024

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 timothee-haudebourg self-assigned this Apr 5, 2024
@timothee-haudebourg timothee-haudebourg changed the title Allow arbitrary map keys Allow arbitrary record fields Apr 5, 2024
@timothee-haudebourg
Copy link
Collaborator Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant