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

CreateObjectContract() protected method

Creates a JsonObjectContract for the given type.
protected CreateObjectContract ( Type objectType ) : JsonObjectContract
objectType System.Type Type of the object.
return JsonObjectContract
    protected virtual JsonObjectContract CreateObjectContract(Type objectType)
    {
      JsonObjectContract contract = new JsonObjectContract(objectType);
      InitializeContract(contract);

      contract.MemberSerialization = JsonTypeReflector.GetObjectMemberSerialization(objectType);
      contract.Properties.AddRange(CreateProperties(contract));
      if (contract.DefaultCreator == null || contract.DefaultCreatorNonPublic)
        contract.ParametrizedConstructor = GetParametrizedConstructor(objectType);

      return contract;
    }