-Improved default null and value handing when JSON value is not compatible with property value
-Added interfaces, structs and enums as valid targets of JsonConverterAttribute
This commit is contained in:
@@ -336,6 +336,24 @@ namespace Newtonsoft.Json
|
||||
}
|
||||
}
|
||||
|
||||
internal static bool IsPrimitiveToken(JsonToken token)
|
||||
{
|
||||
switch (token)
|
||||
{
|
||||
case JsonToken.Integer:
|
||||
case JsonToken.Float:
|
||||
case JsonToken.String:
|
||||
case JsonToken.Boolean:
|
||||
case JsonToken.Undefined:
|
||||
case JsonToken.Null:
|
||||
case JsonToken.Date:
|
||||
case JsonToken.Bytes:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
internal static bool IsStartToken(JsonToken token)
|
||||
{
|
||||
switch (token)
|
||||
|
||||
Reference in New Issue
Block a user