Feature request - Validate JSON against JSON Schema
Hi,
In our Linux based C++ project we are using Boost JSON parsing library but I would like to validate the JSON document against JSON Schema.
I don't see any support for schema validation in Boost JSON.
Did I missed something, or is there any plan to add this feature to Boost?
Thank you
There's no JSON Schema support currently, and there's no current work to add it. But we often get asked about it, so this might change.
It would be a very welcomed feature. How can the community encourage you to raise the priority of this feature?
Thank you!
Just commenting in this issue would be enough
Also would like this feature, maybe I might be able to contribute.
How can the community encourage you to raise the priority of this feature
Well, you could write it, and submit a pull request...
Hi, Any news regarding this schema validator feature?
Thank you
Nothing new yet.
Hi moravas, I am currently reading into the boost JSON internals and the JSON Schema Draft but, as this is my first would be boost contrib. this will take a long while.
Is there enough interest in this to propose it as a GSOC '24 project? I know we'd use JSON Schema validation in C++, if it was available via boost. They're calling for mentors on the boost mailing list at the moment.
Depends on whether @vinniefalco considers this to be in scope.
I initially thought that schema validation could be great in the example section. But I don't know if the implementation would be small enough to work as an example. I guess, if it is appropriate for a GSoC project, it's not so small.
By the way, are there any other features related to JSON Schema, or is it only validation?
Indeed. I don't really have a sense if such a thing should be part of boost::json, or an optional layer on top of it.
There is no rule that says examples can't be large.
The utility of an example greatly diminishes, if the implementation is too large to easily grok
But that is false. The main use-case for examples is as follows: someone makes a copy of the code and incorporates it into their own program, or they use it as the beginning of a new program. For this purpose a large example is as good as any other.
Hi there,
any progress? It would be a great feature in our product, where we process many JSON format text that in first step should fit into particular schema.
I don't know other schema related feature right now
No work has been done on this front so far.