Skip to content

Conversation

@garethsb
Copy link
Contributor

@garethsb garethsb commented May 2, 2019

Field keys must be followed by a colon and a value. At the moment, a lonely field key just terminates object parsing, without an error.

E.g.

[{"meow"}, {"meow": 42, "purr": 57, "hiss"}]

previously parsed as if it were

[{}, {"meow": 42, "purr": 57}]

I've added a test case to the json_test suite and the simple bug fix.

@BillyONeal
Copy link
Member

Thanks for your contribution!

@BillyONeal BillyONeal merged commit e037858 into microsoft:master May 7, 2019
@garethsb garethsb deleted the bug-object-field-key-no-value branch May 8, 2019 07:37
lukka pushed a commit to lukka/cpprestsdk that referenced this pull request May 14, 2019
* json: {"meow"} is not a valid object

* Add to contributors - eighteenth PR seemed like the time! :-)
parkske pushed a commit to Esri/cpprestsdk that referenced this pull request Apr 5, 2021
* json: {"meow"} is not a valid object

* Add to contributors - eighteenth PR seemed like the time! :-)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants