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

wishlist: Simplify creation of new validators #225

Open
chrysn opened this issue Jun 20, 2024 · 0 comments
Open

wishlist: Simplify creation of new validators #225

chrysn opened this issue Jun 20, 2024 · 0 comments

Comments

@chrysn
Copy link

chrysn commented Jun 20, 2024

Currently, the validators for JSON and CBOR contain a mix of serialization-specific code and CDDL tracking (which AIU includes much of the error handling), as evidenced by the large similarity between src/validator/{cbor,json}.rs. This makes it hard to add another validator, in my case, one that processes CBOR diagnostic notation (where the goal is to leave information in the tree that is being visited, eg. spelling out numeric keys with comments or picking <<1>> instead of h'01' when seeing a .cbor).

Hoisting out commonalities from those two files might also help with #219.

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