Go to the documentation of this file.
3#include "nlohmann/json-schema.hpp"
4#include "nlohmann/json.hpp"
9#define CHECK_THROW(x, msg)
14 } catch (std::exception &) {
19 std::cout << msg << std::endl;
23#define CHECK_NO_THROW(x, msg)
26 std::string exception_error;
29 } catch (std::exception & e) {
31 exception_error = e.what();
35 std::cout << msg << ": " << exception_error << std::endl;
43{
44 "type": "object",
45 "properties": {
46 "str": {
47 "type": "string",
48 "format": "placeholder"
49 }
50 }
51}
52)");
62 validator with_format_checker
{nullptr, [](
const std::string &,
const std::string &) {}
};
nlohmann::json_schema::json_validator validator
void set_root_schema(const json &)
json_validator(schema_loader=nullptr, format_checker=nullptr, content_checker=nullptr)
json validate(const json &) const