MCPcopy Create free account
hub / github.com/pboettch/json-schema-validator / validate

Method validate

src/json-validator.cpp:1003–1016  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1001{
1002 bool true_;
1003 void validate(const json::json_pointer &ptr, const json &instance, json_patch &, error_handler &e) const override
1004 {
1005 if (!true_) { // false schema
1006 // empty array
1007 // switch (instance.type()) {
1008 // case json::value_t::array:
1009 // if (instance.size() != 0) // valid false-schema
1010 // e.error(ptr, instance, "false-schema required empty array");
1011 // return;
1012 //}
1013
1014 e.error(ptr, instance, "instance invalid as per false-schema");
1015 }
1016 }
1017
1018public:
1019 boolean(json &sch, root_schema *root)

Callers

nothing calls this directly

Calls 1

errorMethod · 0.45

Tested by

no test coverage detected