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

boon vs. jsonschema? #20

Closed
gadomski opened this issue Oct 2, 2024 · 3 comments
Closed

boon vs. jsonschema? #20

gadomski opened this issue Oct 2, 2024 · 3 comments
Labels
question Further information is requested

Comments

@gadomski
Copy link
Collaborator

gadomski commented Oct 2, 2024

Curiosity question, was there a reason for picking boon over jsonschema? I don't have a strong preference, but jsonschema does feel a bit more built-out and mature. Disclosure: I've used jsonschema in https://github.com/stac-utils/stac-rs and have my issues w/ it (mostly it's blocking-only reference resolution) but it's fit for purpose, at least.

@gadomski gadomski added the question Further information is requested label Oct 2, 2024
@lovrozagar
Copy link

Hi @gadomski ,

The project uses Boon instead of JSON Schema primarily for its lightweight nature and performance benefits, which align better with the parsing and validation requirements of the CQL2 filter language. JSON Schema’s complexity and blocking reference resolution may introduce unnecessary overhead. Boon offers a simpler, more efficient alternative, enhancing the overall development experience for this specific use case.

@gadomski
Copy link
Collaborator Author

gadomski commented Oct 2, 2024

Thanks @lovrozagar! Curious about

performance benefits

The jsonschema benchmarks page has jsonschema on rough parity with boon, with speedups in some cases. Obviously, benchmarks should be taken with significant salt 🧂 , and so I'd be interested to see other comparisons. Do any exist from the boon side (I did a brief search and couldn't find any)?

JSON Schema’s ... blocking reference resolution may introduce unnecessary overhead.

I think that's not a problem for us in cql2-rs because we know we won't need to validate any unknown schemas.

Again, not arguing for or against necessarily, just want to make sure I understand the decision space.

@bitner
Copy link
Contributor

bitner commented Oct 2, 2024

jsonschema doesn't fully support json schema 2020-12 and wasn't able to use the cql2.json schema and boon worked fine with it

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

No branches or pull requests

3 participants