Class SerializeAllContractResolver
Contract resolver to serialize all props in an object by not taking into account the JsonIgnore attribute.
Inheritance
System.Object
SerializeAllContractResolver
Namespace: Celerik.NetCore.Util
Assembly: cs.temp.dll.dll
Syntax
public class SerializeAllContractResolver : DefaultContractResolver
Examples
var settings = new JsonSerializerSettings
{
ContractResolver = new SerializeAllContractResolver()
};
var json = JsonConvert.SerializeObject(obj, settings);
Methods
CreateProperties(Type, MemberSerialization)
Creates properties for the given Newtonsoft.Json.Serialization.JsonContract.
Declaration
protected override IList<JsonProperty> CreateProperties(Type type, MemberSerialization memberSerialization)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type to create properties for. |
MemberSerialization | memberSerialization | The member serialization mode for the type. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IList<JsonProperty> | Properties for the given Newtonsoft.Json.Serialization.JsonContract. |