JSON Voorhees
Killer JSON for C++
parse(std::istream&, const parse_options&)

Reads a JSON value from the input stream.

Note
This function is not intended for verifying if the input is valid JSON, as it will intentionally correctly parse invalid JSON (so long as it resembles valid JSON). See parse_options::create_strict for a strict-mode parse.

Parse JSON from some file.

std::ifstream file("file.json");
jsonv::value out = parse(file);
Exceptions
parse_errorif an error is found in the JSON. If the input terminates unexpectedly, a parse_error will still be thrown with a message like "Unexpected end: unmatched {...". If you suspect the input of going bad, you can check the state flags or set the exception mask of the stream (exceptions thrown by input while processing will be propagated out)

(std::istream&, const parse_options&)