-Added ReadAsInt32 to JsonReader
-Improved performance by using an enum rather than a type check to test contract type
This commit is contained in:
@@ -52,6 +52,8 @@ namespace Newtonsoft.Json.Serialization
|
||||
public JsonArrayContract(Type underlyingType)
|
||||
: base(underlyingType)
|
||||
{
|
||||
ContractType = JsonContractType.Array;
|
||||
|
||||
if (ReflectionUtils.ImplementsGenericDefinition(underlyingType, typeof(ICollection<>), out _genericCollectionDefinitionType))
|
||||
{
|
||||
CollectionItemType = _genericCollectionDefinitionType.GetGenericArguments()[0];
|
||||
|
||||
Reference in New Issue
Block a user