Newtonsoft.Json.Serialization.DefaultContractResolver.CreateContract C# (CSharp) Method

CreateContract() private method

private CreateContract ( Type objectType ) : JsonContract
objectType System.Type
return JsonContract
    private JsonContract CreateContract(Type objectType)
    {
      if (JsonConvert.IsJsonPrimitiveType(objectType))
      {
        return CreatePrimitiveContract(objectType);
      }
      if (JsonTypeReflector.GetJsonObjectAttribute(objectType) != null)
      {
        return CreateObjectContract(objectType);
      }
      if (objectType.IsSubclassOf(typeof(JToken)))
      {
        return CreateLinqContract(objectType);
      }

      if (CollectionUtils.IsDictionaryType(objectType))
      {
        return CreateDictionaryContract(objectType);
      }
      if (typeof(IEnumerable).IsAssignableFrom(objectType))
      {
        return CreateArrayContract(objectType);
      }

      return CreateObjectContract(objectType);
    }