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

json schema validator #305

Closed
csitarichie opened this issue Sep 6, 2016 · 14 comments
Closed

json schema validator #305

csitarichie opened this issue Sep 6, 2016 · 14 comments

Comments

@csitarichie
Copy link

Is there any plan to extend the project to support json schema for validating serialization/ serialization ?.

@nlohmann
Copy link
Owner

nlohmann commented Sep 9, 2016

JSON Schema is quite complicated, and it would not make sense to include validation into a header-only library. However, doing this in a different project surely would make sense. Unfortunately, I do not have time for this right now.

@pboettch
Copy link
Contributor

I started to do exactly that:

https://github.com/pboettch/json-schema-validator

@gregmarr
Copy link
Contributor

@pboettch Have you looked at https://github.com/tristanpenman/valijson which is a header-only C++ library which was tested to work with v1.1.0 of this library?

@pboettch
Copy link
Contributor

I saw it when doing my research, then forgot about it and was disappointed by the validator of rapidjson. Stupid me - it looks good. But I learnt how to use nlohmann::json and I learnt about schemas. Was worth the time spent.

@gregmarr
Copy link
Contributor

That kind of experience with something you weren't well versed in before is always helpful. :)

@nlohmann
Copy link
Owner

@pboettch So what is the state of your project now? Will you continue or are you happy with tristanpenman/valijson?

@pboettch
Copy link
Contributor

pboettch commented Dec 28, 2016

I continue. The design approach is different (completely based on your json-lib and nothing else).

And it's fun.

@mipac
Copy link

mipac commented Mar 26, 2019

JSON Schema is quite complicated, and it would not make sense to include validation into a header-only library. However, doing this in a different project surely would make sense. Unfortunately, I do not have time for this right now.

Sorry for noise, but I can't see why the validation can not be a header only lib?

@pboettch
Copy link
Contributor

Which one? valijson is header only. Mine's not. Mine seems to be faster. Compilation and runtime.

@mipac
Copy link

mipac commented Mar 26, 2019

I've just seen yours, I like the idea of nlohmann lib "addon"
And have you test a header only version of your implementation ;)

@pboettch
Copy link
Contributor

No, but you can try it yourself. Just include the .cpp-file in your code.

You will lose on compile-time, gain nothing on runtime but it might be easier to integrate if you don't want to use CMake.

@mipac
Copy link

mipac commented Mar 26, 2019

ok I'll give a try
in a header only form it could be integrated in this lib

thx for your lib, seems very promising

@pboettch
Copy link
Contributor

Hammering everything to header-only because project-policies is not helping anyone. At least in my opinion.

@mipac
Copy link

mipac commented Mar 26, 2019

Oh ok, I don't have enough experience to have a good opinion
But, I think it could be useful to have an header version and a binary version :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants