diff --git a/src/json-validator.cpp b/src/json-validator.cpp index 1a801bd..276f6b4 100644 --- a/src/json-validator.cpp +++ b/src/json-validator.cpp @@ -171,7 +171,7 @@ public: auto fragment = new_uri.pointer(); // is there a reference looking for this unknown-keyword, which is thus no longer a unknown keyword but a schema - auto unresolved = file.unresolved.find(fragment); + auto unresolved = file.unresolved.find(fragment.to_string()); if (unresolved != file.unresolved.end()) schema::make(value, this, {}, {{new_uri}}); else { // no, nothing ref'd it, keep for later @@ -884,8 +884,8 @@ class boolean : public schema { if (!true_) { // false schema // empty array - //switch (instance.type()) { - //case json::value_t::array: + // switch (instance.type()) { + // case json::value_t::array: // if (instance.size() != 0) // valid false-schema // e.error(ptr, instance, "false-schema required empty array"); // return; diff --git a/src/nlohmann/json-schema.hpp b/src/nlohmann/json-schema.hpp index ebe7cef..07befd3 100644 --- a/src/nlohmann/json-schema.hpp +++ b/src/nlohmann/json-schema.hpp @@ -61,7 +61,7 @@ protected: std::tuple as_tuple() const { - return std::make_tuple(urn_, scheme_, authority_, path_, identifier_ != "" ? identifier_ : pointer_); + return std::make_tuple(urn_, scheme_, authority_, path_, identifier_ != "" ? identifier_ : pointer_.to_string()); } public: @@ -80,7 +80,7 @@ public: std::string fragment() const { if (identifier_ == "") - return pointer_; + return pointer_.to_string(); else return identifier_; }