JsonSerializer.Serialize should check whether the passed-in (dotnet/corefx#42026)
authorAhson Khan <ahson_ahmedk@yahoo.com>
Wed, 23 Oct 2019 07:27:40 +0000 (00:27 -0700)
committerGitHub <noreply@github.com>
Wed, 23 Oct 2019 07:27:40 +0000 (00:27 -0700)
commit722436637cc2c2707247cecc22b232e529ef4d3e
tree6f1be891136290e07ffc25eef8a29f4df6d173e9
parent474e1d6fc6a0256cef2998894ff65b50be73fd57
JsonSerializer.Serialize should check whether the passed-in (dotnet/corefx#42026)

Utf8JsonWriter is null.

Commit migrated from https://github.com/dotnet/corefx/commit/b8cb521e83456bd81dc314c0625d6236d7955bd9
src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.Helpers.cs
src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.Utf8JsonWriter.cs
src/libraries/System.Text.Json/tests/Serialization/WriteValueTests.cs