Revert use of raw pointers in System.Text.Json (#78741)" (#84899)
authorJan Kotas <jkotas@microsoft.com>
Mon, 17 Apr 2023 01:05:21 +0000 (18:05 -0700)
committerGitHub <noreply@github.com>
Mon, 17 Apr 2023 01:05:21 +0000 (18:05 -0700)
commit0099ffa86bc252262530f1245ba16890057875f7
treebeeb038f03f39618b97a5b23bf7581c7618be9a3
parentbee65d373e98b6cec39abec54d2eade98b0a03c6
Revert use of raw pointers in System.Text.Json (#78741)" (#84899)

Revert use of raw pointers for .NET Standard support. This particular raw pointer use does not work with .NET UWP toolchain.

Also, convert uses of Enum.HasFlags to simple bit tests for better .NET Framework and .NET Standard support. Enum.HasFlags performs poorly (boxes) on .NET Framework and .NET Standard targets.

Fixes #84895
src/libraries/System.Text.Json/src/System/Text/Json/Serialization/Converters/Collection/JsonCollectionConverter.cs
src/libraries/System.Text.Json/src/System/Text/Json/Serialization/Converters/Collection/JsonDictionaryConverter.cs
src/libraries/System.Text.Json/src/System/Text/Json/Serialization/Converters/Object/ObjectDefaultConverter.cs
src/libraries/System.Text.Json/src/System/Text/Json/Serialization/Converters/Object/ObjectWithParameterizedConstructorConverter.cs
src/libraries/System.Text.Json/src/System/Text/Json/Serialization/Converters/Value/EnumConverter.cs
src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonConverter.MetadataHandling.cs
src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandleMetadata.cs