Fix warning with nlohmann_json/3.11.2

This commit is contained in:
Gareth Sylvester-Bradley 2022-11-28 17:44:43 +00:00 committed by GitHub
parent dfcb0152e9
commit 0a09545c3b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -255,7 +255,7 @@ public:
// not by a plain name fragment
if (uri.pointer().to_string() != "") {
try {
auto &subschema = file.unknown_keywords.at(uri.pointer()); // null is returned if not existing
auto &subschema = file.unknown_keywords.at(uri.pointer().to_string()); // null is returned if not existing
auto s = schema::make(subschema, this, {}, {{uri}}); // A JSON Schema MUST be an object or a boolean.
if (s) { // nullptr if invalid schema, e.g. null
file.unknown_keywords.erase(uri.fragment());