-Fixed error when writing JSON for a JProperty with no value
-LINQ to JSON performance improvements
This commit is contained in:
@@ -528,7 +528,10 @@ namespace Newtonsoft.Json.Linq
|
||||
}
|
||||
|
||||
JsonConverter matchingConverter;
|
||||
if (_value != null && ((matchingConverter = JsonSerializer.GetMatchingConverter(converters, _value.GetType())) != null))
|
||||
if (_value != null
|
||||
&& converters != null
|
||||
&& converters.Length > 0
|
||||
&& ((matchingConverter = JsonSerializer.GetMatchingConverter(converters, _value.GetType())) != null))
|
||||
{
|
||||
matchingConverter.WriteJson(writer, _value, new JsonSerializer());
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user