You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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.
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?
Activity
nlohmann commentedon 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 commentedon Dec 27, 2016
I started to do exactly that:
https://github.com/pboettch/json-schema-validator
gregmarr commentedon Dec 27, 2016
@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 commentedon Dec 27, 2016
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::jsonand I learnt about schemas. Was worth the time spent.gregmarr commentedon Dec 27, 2016
That kind of experience with something you weren't well versed in before is always helpful. :)
nlohmann commentedon Dec 28, 2016
@pboettch So what is the state of your project now? Will you continue or are you happy with tristanpenman/valijson?
pboettch commentedon Dec 28, 2016
I continue. The design approach is different (completely based on your json-lib and nothing else).
And it's fun.
mipac commentedon Mar 26, 2019
Sorry for noise, but I can't see why the validation can not be a header only lib?
pboettch commentedon Mar 26, 2019
Which one? valijson is header only. Mine's not. Mine seems to be faster. Compilation and runtime.
mipac commentedon 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 commentedon Mar 26, 2019
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 commentedon 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 commentedon Mar 26, 2019
Hammering everything to header-only because project-policies is not helping anyone. At least in my opinion.
mipac commentedon 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