I am trying to implement a JSON validation class, that takes in JSON (as a
std::string) and validates it against the established schema.

I have managed to create the JSON schema and get avrogencpp to compile
header files. However, now I am having difficulty understanding how to use
the header files.

The examples in the documentation, and batched with the source code, only
show how to read in information from a file to a ValidSchema object or how
to create a generated object, edit the members and then send that to an
input stream.

I would like to be able to have a permanent variable for the schema (which
I might be okay with reading in the schema from a file) and then somehow
compare the front-end / user provided JSON string to the schema. Does
anyone have a working example, pseudo-code, suggestions or tips of how I
would go about achieving this?

Thanks.

Reply via email to