Skip to content

wishlist: Simplify creation of new validators #225

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

Open
chrysn opened this issue Jun 20, 2024 · 1 comment
Open

wishlist: Simplify creation of new validators #225

chrysn opened this issue Jun 20, 2024 · 1 comment
Labels
enhancement New feature or request
Milestone

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.

@anweiss
Copy link
Owner

anweiss commented Feb 5, 2025

Totally agree! Would love to do this at some point but just haven't gotten around to it. You're welcome to submit some approaches in a PR or two!

@anweiss anweiss added this to the Backlog milestone Feb 10, 2025
@anweiss anweiss added the enhancement New feature or request label Feb 10, 2025
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

No branches or pull requests

2 participants