void build_json_map(const json::Value& json) { for (auto it = json.cbegin(); it != json.cend(); ++it) { m_json_path.push_key(it.key()); const auto& json_value = *it; m_json_map[m_json_path.get_path()] = json_value; if (!json_value.is_array()) { build_json_map(json_value); } m_json_path.pop_key(); } }
bool load_schema(const json::Value& schema, SchemaValidator& validator) { for (auto it = schema.cbegin(); it != schema.cend(); it++) { m_json_path.push_key(it.key()); if (is_validator_object(*it)) { process_json_property(m_json_path.get_path(), *it, validator); m_json_path.pop_key(); continue; } load_schema(*it, validator); m_json_path.pop_key(); } return true; }