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

Deserialize for array structs with optional fields (for reasonable cases) #203

Closed
rooooooooob opened this issue Jul 27, 2023 · 0 comments · Fixed by #204
Closed

Deserialize for array structs with optional fields (for reasonable cases) #203

rooooooooob opened this issue Jul 27, 2023 · 0 comments · Fixed by #204
Assignees
Labels
bug Something isn't working CDDL feature Feature that is required for proper parsing of CDDL files

Comments

@rooooooooob
Copy link
Collaborator

We could support this for reasonable cases

See discussion in #201

The general case isn't worth it since it can even be completely ambiguous for specifically designed CDDLs, and other ones could be designed that aren't ambiguous but would require possible combinatorial backtracking into nested structs to figure out which of the many possible interpretations are valid.

Think things like [? uint, (? uint, uint, text), ?uint, (? text, (? float, uint)), ? float]

@rooooooooob rooooooooob added bug Something isn't working CDDL feature Feature that is required for proper parsing of CDDL files labels Jul 27, 2023
@rooooooooob rooooooooob self-assigned this Jul 27, 2023
rooooooooob added a commit that referenced this issue Jul 27, 2023
Fixes #203

Fixes #154 as this issue popped up while making sure optional fields
were very well supported.
rooooooooob added a commit that referenced this issue Aug 2, 2023
Fixes #203

Fixes #154 as this issue popped up while making sure optional fields
were very well supported.
rooooooooob added a commit that referenced this issue Aug 9, 2023
* Deserialize for array groups with optional fields

Fixes #203

Fixes #154 as this issue popped up while making sure optional fields
were very well supported.

* Optional array fields with preserve-encodings=true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working CDDL feature Feature that is required for proper parsing of CDDL files
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant