Go to the documentation of this file. 1#include <nlohmann/json-schema.hpp>
11[{"op":"add","path":"/0/renderable/bg","value":"Black"}]
12)"_json;
15[
16 {
17 "name":"player",
18 "renderable": {
19 "fg":"White"
20 }
21 }
22]
23)"_json;
27 std::string filename =
"./" + uri
.path();
28 std::ifstream lf(filename);
30 throw std::invalid_argument(
"could not open " + uri
.url() +
" tried with " + filename);
33 }
catch (
const std::exception &e) {
42 std::fstream f(
"blueprints.schema.json");
51 std::cerr << missing_default_patch <<
"\n";
void set_root_schema(const json &)
json_validator(schema_loader=nullptr, format_checker=nullptr, content_checker=nullptr)
json validate(const json &) const
const std::string & path() const
static const auto instance
static void loader(const json_uri &uri, json &schema)
static const auto expected_patch