Fix bug: attr.value() of an array attribute returns an iterator of basic_json objects not an iterator of std::string

This commit is contained in:
Volker Christian 2023-06-15 17:20:37 +02:00
parent 1242ae1a4a
commit c16a397393

View File

@ -604,10 +604,12 @@ public:
} break;
case json::value_t::array: // "type": ["type1", "type2"]
for (auto &schema_type : attr.value())
for (auto &array_value : attr.value()) {
auto schema_type = array_value.get<std::string>();
for (auto &t : schema_types)
if (t.first == schema_type)
type_[static_cast<uint8_t>(t.second)] = type_schema::make(sch, t.second, root, uris, known_keywords);
}
break;
default: