pboettch / json-schema-validator

JSON schema validator for JSON for Modern C++
Other
466 stars 134 forks source link

Support draft-7 (and draft-8 if it arrives in time) #35

Closed pboettch closed 5 years ago

pboettch commented 5 years ago

Supporting draft-7 and later version.

pboettch commented 5 years ago

This will be achieved by a more modular approach of validation classes and a validator-tree.

The interpretation approach used in 1.0 is not robust enough.

jongough commented 5 years ago

Hi, Do you have a timeframe for supporting Draft 7? I am looking for support of propertyNames so that I can define a schema to validate multiple messages. I have looked in the json-validator.cpp to see where this may fit, but I don't understand the code well enough or how it works to try a solution. If you have any hints as to where the property should be checked I can give it a go and see if I can get it working.

Thanks

pboettch commented 5 years ago

I'm working on it during this summer. Don't try to add it in the current version. It won't work. There are too many flaws and design-issues.

jongough commented 5 years ago

OK. I will leave the changes to you.

pboettch commented 5 years ago

A new version is coming, it currently validates the draft7-test-suite completely, except the optional tests.

I hope I can put something to the master-branch this week.

jongough commented 5 years ago

Hi, I have looked at the 'next' branch to get a heads up on your work. I am trying to incorporate it into my application, but I have a couple of issues/opportunities:

Any help you can give on incorporating your software would be most welcome.

Regards Jon

pboettch commented 5 years ago

The next-branch is not functional yet. At least not using the normal API.

Regarding your integration issue it should be compiled as a static or dynamic library and then be used as this. The .hpp + the .a/.so/.dll together with your application.

jongough commented 5 years ago

I would like to be able to link the library in rather than having another module that needs to be copied around (1 less thing to go wrong with an installation). I do this for graphics libraries using 'add_library( STATIC ) and it works quite well.

I am just trying to get the cmake stuff sorted rather than doing any real testing. Currently I can turn off the schema stuff with a flag so it isn't a problem. Just tinkering at the moment.