Add WriteTo API on JsonDocument and JsonProperty (dotnet/corefx#39367)
authorVishnu Kumar <sasivishnu@gmail.com>
Fri, 12 Jul 2019 22:06:08 +0000 (03:36 +0530)
committerEric StJohn <ericstj@microsoft.com>
Fri, 12 Jul 2019 22:06:08 +0000 (15:06 -0700)
commit600528b6ccc37bacbfc497c624785cd7afb3c191
tree14ce66b0fb5f6b033f55feded37356e484a7b270
parent0bd9325c2b07fa2dcac7297222dca8f71fddf74e
Add WriteTo API on JsonDocument and JsonProperty (dotnet/corefx#39367)

* Remove WriteProperty methods and rename WriteValue to WriteTo in JsonElement (dotnet/corefx#39037)

* Add WriteTo method in JsonDocument and JsonProperty (dotnet/corefx#39037)

* Remove all repeated tests from JsonDocument and JsonProperty for now.

* Added null check for Utf8JsonWriter parameter in WriteTo methods on JsonElement, JsonDocument and JsonProperty

* Code review changes

Commit migrated from https://github.com/dotnet/corefx/commit/798468fb39d869a96104306483ed6ef4d63738ca
src/libraries/System.Text.Json/ref/System.Text.Json.cs
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/Document/JsonProperty.cs
src/libraries/System.Text.Json/src/System/Text/Json/Serialization/Converters/JsonValueConverterJsonElement.cs
src/libraries/System.Text.Json/tests/JsonDocumentTests.cs
src/libraries/System.Text.Json/tests/JsonElementWriteTests.cs
src/libraries/System.Text.Json/tests/JsonPropertyTests.cs [new file with mode: 0644]
src/libraries/System.Text.Json/tests/System.Text.Json.Tests.csproj