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

Support CDDL bareword member key syntax for maps #171

Open
adpjhu opened this issue Feb 17, 2022 · 2 comments
Open

Support CDDL bareword member key syntax for maps #171

adpjhu opened this issue Feb 17, 2022 · 2 comments
Labels
enhancement New feature or request

Comments

@adpjhu
Copy link

adpjhu commented Feb 17, 2022

It appears that the CDDL parser can only identify member keys of maps in CDDL when they have double quotes. The spec document section linked below allows for member keys without double quotes followed by a colon.

https://cbor-wg.github.io/cddl/draft-ietf-cbor-cddl.html#structs

@oyvindronningstad
Copy link
Collaborator

Thanks for the report, it's now tracked internally. In the meantime, the workaround is (as you are probably aware) to use quotes and =>:

{
    "literal_tstr_key" => my_value
}

@oyvindronningstad
Copy link
Collaborator

@adpjhu Bareword support is in PR #292. You're welcome to leave a review.

@oyvindronningstad oyvindronningstad added the enhancement New feature or request label Aug 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants