System.Net.Http.Formatting.JsonContractResolver.CreateObjectContract C# (CSharp) Method

CreateObjectContract() protected method

protected CreateObjectContract ( Type type ) : JsonObjectContract
type Type
return Newtonsoft.Json.Serialization.JsonObjectContract
        protected override JsonObjectContract CreateObjectContract(Type type)
        {
            JsonObjectContract contract = base.CreateObjectContract(type);

            // Handling [Serializable] types
            if (type.IsSerializable && !IsTypeNullable(type) && !IsTypeJsonObject(type))
            {
                contract.Properties.Clear();
                foreach (JsonProperty property in CreateSerializableJsonProperties(type))
                {
                    contract.Properties.Add(property);
                }
            }

            return contract;
        }