Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CONTRIBUTORS.txt
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,6 @@ leetal

Benjamin Lee (mobileben)
René Meusel (reneme)

Sony Corporation
Gareth Sylvester-Bradley (garethsb-sony)
2 changes: 1 addition & 1 deletion Release/src/json/json_parsing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -965,7 +965,7 @@ std::unique_ptr<web::json::details::_Value> JSON_Parser<CharType>::_ParseObject(
if (tkn.m_error) goto error;

// State 2: Looking for a colon.
if (tkn.kind != JSON_Parser<CharType>::Token::TKN_Colon) goto done;
if (tkn.kind != JSON_Parser<CharType>::Token::TKN_Colon) goto error;

GetNextToken(tkn);
if (tkn.m_error) goto error;
Expand Down
6 changes: 6 additions & 0 deletions Release/tests/functional/json/parsing_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -469,6 +469,12 @@ SUITE(parsing_tests)
VERIFY_ARE_EQUAL(0u, arr.size());
}

TEST(bug_object_field_key_no_value)
{
VERIFY_PARSING_THROW(json::value::parse(U("{\"meow\"}")));
VERIFY_PARSING_THROW(json::value::parse(U("{\"meow\": 42, \"purr\": 57, \"hiss\"}")));
}

TEST(bug_416116)
{
json::value data2 = json::value::parse(U("\"δοκιμή\""));
Expand Down