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
Suppose I parsed a string from an unreliable source.
How can I validate the result json object ? (make sure it has certain structure / contents. Such as a list of 3 numbers and then a string ?)
Other than using a long boilerplate code with size() and get<>() and is_* ?
The text was updated successfully, but these errors were encountered:
To validate a json instance or document, the json-schema.org has defined "a vocabulary that allows you to annotate and validate JSON documents" (citation from their site).
To my knowledge, there are two libraries written in C++ on github. One written by me, which supports draft4-version of json-schema.org only and is entirely based on this (nlohmann/json) library for json-parsing.
And there is valijson by Tristan Penman which does support other C++ json-parsers as well.
Suppose I parsed a string from an unreliable source.
How can I validate the result json object ? (make sure it has certain structure / contents. Such as a list of 3 numbers and then a string ?)
Other than using a long boilerplate code with size() and get<>() and is_* ?
The text was updated successfully, but these errors were encountered: