Add support for trailing commas within Utf8JsonReader (dotnet/corefx#36690)
authorAhson Khan <ahkha@microsoft.com>
Mon, 8 Apr 2019 09:55:50 +0000 (02:55 -0700)
committerGitHub <noreply@github.com>
Mon, 8 Apr 2019 09:55:50 +0000 (02:55 -0700)
commitfed1a6577c3d88b6a4db420cbdeb8f8f46bdb97b
tree1fec443e696ca909a0108a8f0eaf59830670ab4d
parent345964b972c89e4a4337c653d6a554bb0d2f3d6e
 Add support for trailing commas within Utf8JsonReader (dotnet/corefx#36690)

* Add support for trailing commas with single-segment tests.

* Implement single-segment case and update tests.

* Update multi-segment path and add tests.

* Add more tests, add to state, and update rollback logic.

Commit migrated from https://github.com/dotnet/corefx/commit/87fdc75beacc76e02c8e572ae3b0613b418200eb
src/libraries/System.Text.Json/ref/System.Text.Json.cs
src/libraries/System.Text.Json/src/Resources/Strings.resx
src/libraries/System.Text.Json/src/System/Text/Json/Reader/JsonReaderOptions.cs
src/libraries/System.Text.Json/src/System/Text/Json/Reader/JsonReaderState.cs
src/libraries/System.Text.Json/src/System/Text/Json/Reader/Utf8JsonReader.MultiSegment.cs
src/libraries/System.Text.Json/src/System/Text/Json/Reader/Utf8JsonReader.cs
src/libraries/System.Text.Json/src/System/Text/Json/ThrowHelper.cs
src/libraries/System.Text.Json/tests/Utf8JsonReaderTests.MultiSegment.cs
src/libraries/System.Text.Json/tests/Utf8JsonReaderTests.cs