mirror of
https://github.com/nlohmann/json.git
synced 2024-08-23 13:32:28 +02:00
minor change to the parsing of objects/arrays
This commit is contained in:
parent
a372937424
commit
c7f95cc636
|
@ -4716,9 +4716,9 @@ basic_json_parser_59:
|
||||||
get_token();
|
get_token();
|
||||||
expect(lexer::token_type::name_separator);
|
expect(lexer::token_type::name_separator);
|
||||||
|
|
||||||
// parse value
|
// parse and add value
|
||||||
get_token();
|
get_token();
|
||||||
result[key] = parse_internal();
|
result.m_value.object->emplace(key, parse_internal());
|
||||||
}
|
}
|
||||||
while (last_token == lexer::token_type::value_separator);
|
while (last_token == lexer::token_type::value_separator);
|
||||||
|
|
||||||
|
@ -4753,8 +4753,8 @@ basic_json_parser_59:
|
||||||
get_token();
|
get_token();
|
||||||
}
|
}
|
||||||
|
|
||||||
// parse value
|
// parse and add value
|
||||||
result.push_back(parse_internal());
|
result.m_value.array->emplace_back(parse_internal());
|
||||||
}
|
}
|
||||||
while (last_token == lexer::token_type::value_separator);
|
while (last_token == lexer::token_type::value_separator);
|
||||||
|
|
||||||
|
|
|
@ -4022,9 +4022,9 @@ class basic_json
|
||||||
get_token();
|
get_token();
|
||||||
expect(lexer::token_type::name_separator);
|
expect(lexer::token_type::name_separator);
|
||||||
|
|
||||||
// parse value
|
// parse and add value
|
||||||
get_token();
|
get_token();
|
||||||
result[key] = parse_internal();
|
result.m_value.object->emplace(key, parse_internal());
|
||||||
}
|
}
|
||||||
while (last_token == lexer::token_type::value_separator);
|
while (last_token == lexer::token_type::value_separator);
|
||||||
|
|
||||||
|
@ -4059,8 +4059,8 @@ class basic_json
|
||||||
get_token();
|
get_token();
|
||||||
}
|
}
|
||||||
|
|
||||||
// parse value
|
// parse and add value
|
||||||
result.push_back(parse_internal());
|
result.m_value.array->emplace_back(parse_internal());
|
||||||
}
|
}
|
||||||
while (last_token == lexer::token_type::value_separator);
|
while (last_token == lexer::token_type::value_separator);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue