diff --git a/Src/Directory.Build.props b/Src/Directory.Build.props index 11ecc418..66135088 100644 --- a/Src/Directory.Build.props +++ b/Src/Directory.Build.props @@ -3,10 +3,9 @@ 4.6.2 0.10.10 4.2.3 - 2.9.2 + 5.0.3 4.3.0 - 1.0.0-beta2-19367-01 - 3.8.0 + 1.0.0 16.3.0 4.8.1 3.11.0 diff --git a/Src/Newtonsoft.Json/JsonSerializer.cs b/Src/Newtonsoft.Json/JsonSerializer.cs index c4e6b693..23f5c6b6 100644 --- a/Src/Newtonsoft.Json/JsonSerializer.cs +++ b/Src/Newtonsoft.Json/JsonSerializer.cs @@ -867,9 +867,7 @@ namespace Newtonsoft.Json [DebuggerStepThrough] public T? Deserialize(JsonReader reader) { -#pragma warning disable CS8601 // Possible null reference assignment. - return (T)Deserialize(reader, typeof(T)); -#pragma warning restore CS8601 // Possible null reference assignment. + return (T?)Deserialize(reader, typeof(T)); } /// diff --git a/Src/Newtonsoft.Json/Newtonsoft.Json.csproj b/Src/Newtonsoft.Json/Newtonsoft.Json.csproj index bbb6328a..4dd7b55a 100644 --- a/Src/Newtonsoft.Json/Newtonsoft.Json.csproj +++ b/Src/Newtonsoft.Json/Newtonsoft.Json.csproj @@ -39,10 +39,8 @@ - + - - Json.NET diff --git a/Src/Newtonsoft.Json/Utilities/DictionaryWrapper.cs b/Src/Newtonsoft.Json/Utilities/DictionaryWrapper.cs index 9b62e070..a92e2639 100644 --- a/Src/Newtonsoft.Json/Utilities/DictionaryWrapper.cs +++ b/Src/Newtonsoft.Json/Utilities/DictionaryWrapper.cs @@ -492,8 +492,12 @@ namespace Newtonsoft.Json.Utilities #endif else { + // Consider changing this code to call GenericDictionary.Remove when value is null. + // #pragma warning disable CS8601 // Possible null reference assignment. +#pragma warning disable CS8600 // Converting null literal or possible null value to non-nullable type. GenericDictionary[(TKey)key] = (TValue)value; +#pragma warning restore CS8600 // Converting null literal or possible null value to non-nullable type. #pragma warning restore CS8601 // Possible null reference assignment. } }