1
0
mirror of https://github.com/nlohmann/json.git synced 2025-08-09 05:22:48 +03:00

🐛 fix invariants

This commit is contained in:
Niels Lohmann
2021-01-10 22:40:50 +01:00
parent 9d0150c234
commit ff57bdcc8b
5 changed files with 118 additions and 60 deletions

View File

@@ -90,7 +90,6 @@ class parser
{
json_sax_dom_callback_parser<BasicJsonType> sdp(result, callback, allow_exceptions);
sax_parse_internal(&sdp);
result.assert_invariant();
// in strict mode, input must be completely read
if (strict && (get_token() != token_type::end_of_input))
@@ -119,7 +118,6 @@ class parser
{
json_sax_dom_parser<BasicJsonType> sdp(result, allow_exceptions);
sax_parse_internal(&sdp);
result.assert_invariant();
// in strict mode, input must be completely read
if (strict && (get_token() != token_type::end_of_input))
@@ -137,6 +135,8 @@ class parser
return;
}
}
result.assert_invariant();
}
/*!