-Changed null values in JToken extension data dictionary to be JTokenType.Null
This commit is contained in:
@@ -482,8 +482,8 @@ namespace Newtonsoft.Json.Serialization
|
||||
|
||||
// convert object value to JToken so it is compatible with dictionary
|
||||
// could happen because of primitive types, type name handling and references
|
||||
if (isJTokenValueType && !(value is JToken) && value!=null)
|
||||
value = JToken.FromObject(value);
|
||||
if (isJTokenValueType && !(value is JToken))
|
||||
value = (value != null) ? JToken.FromObject(value) : new JValue(null, JTokenType.Null);
|
||||
|
||||
setExtensionDataDictionaryValue(dictionary, key, value);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user