Add Base64 APIs to Utf8JsonReader, Utf8JsonWriter, and JsonElement (dotnet/corefx...
authorAhson Khan <ahkha@microsoft.com>
Fri, 31 May 2019 05:13:31 +0000 (22:13 -0700)
committerGitHub <noreply@github.com>
Fri, 31 May 2019 05:13:31 +0000 (22:13 -0700)
commitbb18f7869f7dd9fa84cf9930bac4629a68bacf7c
tree2146425900ab7baa3a28e0c297bd953fd2223a41
parentfed5acc4e1b8ac07d6dfe214a069f440a2673594
Add Base64 APIs to Utf8JsonReader, Utf8JsonWriter, and JsonElement (dotnet/corefx#38048)

* Add Utf8JsonWriter Base64 APIs.

* Add Utf8JsonReader Base64 APIs.

* Add JsonElement Base64 APIs.

* Update API shape based on review.

* Auto-generate the ref assembly.

* Address PR feedback so far.

* Add escaping step and update length counters accordingly.

* Add JsonWriter API tests.

* Add JsonReader and JsonElement tests.

Commit migrated from https://github.com/dotnet/corefx/commit/82408cd90f4d4573d502e8df2ca437b35e6a37f7
17 files changed:
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.csproj
src/libraries/System.Text.Json/src/System/Text/Json/Document/JsonDocument.cs
src/libraries/System.Text.Json/src/System/Text/Json/Document/JsonElement.cs
src/libraries/System.Text.Json/src/System/Text/Json/JsonConstants.cs
src/libraries/System.Text.Json/src/System/Text/Json/Reader/JsonReaderHelper.Unescaping.cs
src/libraries/System.Text.Json/src/System/Text/Json/Reader/Utf8JsonReader.TryGet.cs
src/libraries/System.Text.Json/src/System/Text/Json/ThrowHelper.cs
src/libraries/System.Text.Json/src/System/Text/Json/Writer/JsonWriterHelper.Escaping.cs
src/libraries/System.Text.Json/src/System/Text/Json/Writer/JsonWriterHelper.cs
src/libraries/System.Text.Json/src/System/Text/Json/Writer/Utf8JsonWriter.WriteProperties.Bytes.cs [new file with mode: 0644]
src/libraries/System.Text.Json/src/System/Text/Json/Writer/Utf8JsonWriter.WriteValues.Bytes.cs [new file with mode: 0644]
src/libraries/System.Text.Json/src/System/Text/Json/Writer/Utf8JsonWriter.WriteValues.Helpers.cs
src/libraries/System.Text.Json/tests/JsonDocumentTests.cs
src/libraries/System.Text.Json/tests/Utf8JsonReaderTests.TryGet.cs
src/libraries/System.Text.Json/tests/Utf8JsonWriterTests.cs