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

Feature request - Validate JSON against JSON Schema #842

Open
moravas opened this issue Jan 17, 2023 · 16 comments
Open

Feature request - Validate JSON against JSON Schema #842

moravas opened this issue Jan 17, 2023 · 16 comments

Comments

@moravas
Copy link

moravas commented Jan 17, 2023

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

@grisumbras
Copy link
Member

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.

@moravas
Copy link
Author

moravas commented Jan 28, 2023

It would be a very welcomed feature. How can the community encourage you to raise the priority of this feature?

Thank you!

@grisumbras
Copy link
Member

Just commenting in this issue would be enough

@Superlokkus
Copy link

Also would like this feature, maybe I might be able to contribute.

@vinniefalco
Copy link
Member

How can the community encourage you to raise the priority of this feature

Well, you could write it, and submit a pull request...

@moravas
Copy link
Author

moravas commented Jul 13, 2023

Hi,
Any news regarding this schema validator feature?

Thank you

@grisumbras
Copy link
Member

Nothing new yet.

@Superlokkus
Copy link

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.

@nigels-com
Copy link
Contributor

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.

@grisumbras
Copy link
Member

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?

@nigels-com
Copy link
Contributor

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.

@vinniefalco
Copy link
Member

There is no rule that says examples can't be large.

@grisumbras
Copy link
Member

The utility of an example greatly diminishes, if the implementation is too large to easily grok

@vinniefalco
Copy link
Member

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.

@moravas
Copy link
Author

moravas commented Jun 2, 2024

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

@grisumbras
Copy link
Member

No work has been done on this front so far.

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

5 participants