From c9e12bc4755c786a9073dddf1be14cd27823a498 Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Fri, 23 Jul 2021 04:21:06 -0600 Subject: [PATCH] Add nullable annotation to `JToken.ToObject(Type, JsonSerializer)` --- Src/Newtonsoft.Json/Linq/JToken.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Src/Newtonsoft.Json/Linq/JToken.cs b/Src/Newtonsoft.Json/Linq/JToken.cs index ff4aaf93..9cb008ae 100644 --- a/Src/Newtonsoft.Json/Linq/JToken.cs +++ b/Src/Newtonsoft.Json/Linq/JToken.cs @@ -2074,7 +2074,7 @@ namespace Newtonsoft.Json.Linq /// The object type that the token will be deserialized to. /// The that will be used when creating the object. /// The new object created from the JSON value. - public object? ToObject(Type objectType, JsonSerializer jsonSerializer) + public object? ToObject(Type? objectType, JsonSerializer jsonSerializer) { ValidationUtils.ArgumentNotNull(jsonSerializer, nameof(jsonSerializer)); @@ -2755,4 +2755,4 @@ namespace Newtonsoft.Json.Linq } } } -} \ No newline at end of file +}