mirror of
https://github.com/nlohmann/json.git
synced 2025-07-28 12:02:00 +03:00
minor change to the parsing of objects/arrays
This commit is contained in:
@ -4022,9 +4022,9 @@ class basic_json
|
||||
get_token();
|
||||
expect(lexer::token_type::name_separator);
|
||||
|
||||
// parse value
|
||||
// parse and add value
|
||||
get_token();
|
||||
result[key] = parse_internal();
|
||||
result.m_value.object->emplace(key, parse_internal());
|
||||
}
|
||||
while (last_token == lexer::token_type::value_separator);
|
||||
|
||||
@ -4059,8 +4059,8 @@ class basic_json
|
||||
get_token();
|
||||
}
|
||||
|
||||
// parse value
|
||||
result.push_back(parse_internal());
|
||||
// parse and add value
|
||||
result.m_value.array->emplace_back(parse_internal());
|
||||
}
|
||||
while (last_token == lexer::token_type::value_separator);
|
||||
|
||||
|
Reference in New Issue
Block a user