From 7ab96207c598f99461adb70678c42867a9f1da3e Mon Sep 17 00:00:00 2001 From: Tristan Penman Date: Sun, 17 Jan 2021 17:42:55 +1100 Subject: [PATCH] Ensure ref values are strings --- include/valijson/schema_parser.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/valijson/schema_parser.hpp b/include/valijson/schema_parser.hpp index 329c7b1..f7c4a06 100644 --- a/include/valijson/schema_parser.hpp +++ b/include/valijson/schema_parser.hpp @@ -242,7 +242,7 @@ private: const typename AdapterType::Object::const_iterator itr = o.find("$ref"); if (itr == o.end()) { return false; - } else if (!itr->second.asString(result)) { + } else if (!itr->second.getString(result)) { throwRuntimeError("$ref property expected to contain string value."); }