Fix nested objects in object arrays (dotnet/corefx#38527)
authorJeremy Kuhne <jeremy.kuhne@microsoft.com>
Fri, 21 Jun 2019 21:48:31 +0000 (14:48 -0700)
committerGitHub <noreply@github.com>
Fri, 21 Jun 2019 21:48:31 +0000 (14:48 -0700)
commit73a73942a96635ccc1925177d4a864747145dab1
tree69f8ebbce5e692a6f84593e16878c4e099135ac3
parentf126acadfb93341cbf473ab96ded8d1b86a1d105
Fix nested objects in object arrays (dotnet/corefx#38527)

We weren't recognizing polymorphism for json objects nested in .NET object arrays.

This change also hides the debugger backing field for clarity.

Commit migrated from https://github.com/dotnet/corefx/commit/8be1263dc00a0ce14b5c2dfb4077d4a92cbf6d3b
src/libraries/System.Text.Json/src/System/Text/Json/Document/JsonElement.cs
src/libraries/System.Text.Json/src/System/Text/Json/Reader/Utf8JsonReader.cs
src/libraries/System.Text.Json/src/System/Text/Json/Writer/Utf8JsonWriter.cs
src/libraries/System.Text.Json/tests/Serialization/Object.ReadTests.cs