Removed need for Nullable converters in Json serialization (dotnet/corefx#35754)
authorTyler Brinkley <Tydude4Christ@hotmail.com>
Wed, 20 Mar 2019 19:07:51 +0000 (14:07 -0500)
committerSteve Harter <steveharter@users.noreply.github.com>
Wed, 20 Mar 2019 19:07:51 +0000 (14:07 -0500)
commitf094cb0f87a035bfa799ec0c236906eed0b3a812
tree044bb455c9c79db36295d389d22a89eca5921e45
parentc1f6d755bc98c6c0347ef39bba57458b8a04c2a3
Removed need for Nullable converters in Json serialization (dotnet/corefx#35754)

Added support for Nullable<T> properties where a Nullable converter is no longer required.
Enum converter has generic constraint to `Enum` type.

Commit migrated from https://github.com/dotnet/corefx/commit/b0751dcd4a419ba6731dcaa7d240a8a1946c934c
27 files changed:
src/libraries/System.Text.Json/src/System.Text.Json.csproj
src/libraries/System.Text.Json/src/System/Text/Json/Serialization/Converters/DefaultConverters.cs
src/libraries/System.Text.Json/src/System/Text/Json/Serialization/Converters/DefaultConvertersOfTValue.cs [new file with mode: 0644]
src/libraries/System.Text.Json/src/System/Text/Json/Serialization/Converters/DefaultEnumConverter.cs [deleted file]
src/libraries/System.Text.Json/src/System/Text/Json/Serialization/Converters/JsonValueConverterBooleanNullable.cs [deleted file]
src/libraries/System.Text.Json/src/System/Text/Json/Serialization/Converters/JsonValueConverterByteNullable.cs [deleted file]
src/libraries/System.Text.Json/src/System/Text/Json/Serialization/Converters/JsonValueConverterCharNullable.cs [deleted file]
src/libraries/System.Text.Json/src/System/Text/Json/Serialization/Converters/JsonValueConverterDateTimeNullable.cs [deleted file]
src/libraries/System.Text.Json/src/System/Text/Json/Serialization/Converters/JsonValueConverterDecimalNullable.cs [deleted file]
src/libraries/System.Text.Json/src/System/Text/Json/Serialization/Converters/JsonValueConverterDoubleNullable.cs [deleted file]
src/libraries/System.Text.Json/src/System/Text/Json/Serialization/Converters/JsonValueConverterEnum.cs [new file with mode: 0644]
src/libraries/System.Text.Json/src/System/Text/Json/Serialization/Converters/JsonValueConverterInt16.cs [moved from src/libraries/System.Text.Json/src/System/Text/Json/Serialization/Converters/JsonValueConverterInfoInt16.cs with 100% similarity]
src/libraries/System.Text.Json/src/System/Text/Json/Serialization/Converters/JsonValueConverterInt16Nullable.cs [deleted file]
src/libraries/System.Text.Json/src/System/Text/Json/Serialization/Converters/JsonValueConverterInt32Nullable.cs [deleted file]
src/libraries/System.Text.Json/src/System/Text/Json/Serialization/Converters/JsonValueConverterInt64Nullable.cs [deleted file]
src/libraries/System.Text.Json/src/System/Text/Json/Serialization/Converters/JsonValueConverterSByteNullable.cs [deleted file]
src/libraries/System.Text.Json/src/System/Text/Json/Serialization/Converters/JsonValueConverterSingleNullable.cs [deleted file]
src/libraries/System.Text.Json/src/System/Text/Json/Serialization/Converters/JsonValueConverterUInt16Nullable.cs [deleted file]
src/libraries/System.Text.Json/src/System/Text/Json/Serialization/Converters/JsonValueConverterUInt32Nullable.cs [deleted file]
src/libraries/System.Text.Json/src/System/Text/Json/Serialization/Converters/JsonValueConverterUInt64Nullable.cs [deleted file]
src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonClassInfo.AddProperty.cs
src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonClassInfo.cs
src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfoNotNullable.cs [moved from src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfoOfTClassTProperty.cs with 63% similarity]
src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfoNullable.cs [new file with mode: 0644]
src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfoOfTClassTPropertyTUnderlying.cs [new file with mode: 0644]
src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfoOfTProperty.cs [deleted file]
src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.cs