Table of Contents

Class JsonContract

Namespace
Newtonsoft.Json.Serialization
Assembly
Newtonsoft.Json.dll

Contract details for a Type used by the JsonSerializer.

public abstract class JsonContract
Inheritance
JsonContract
Derived
Inherited Members

Properties

Converter

Gets or sets the default JsonConverter for this contract.

public JsonConverter Converter { get; set; }

Property Value

JsonConverter

The converter.

CreatedType

Gets or sets the type created during deserialization.

public Type CreatedType { get; set; }

Property Value

Type

The type created during deserialization.

DefaultCreator

Gets or sets the default creator method used to create the object.

public Func<object> DefaultCreator { get; set; }

Property Value

Func<object>

The default creator method used to create the object.

DefaultCreatorNonPublic

Gets or sets a value indicating whether [default creator non public].

public bool DefaultCreatorNonPublic { get; set; }

Property Value

bool

true if the default object creator is non-public; otherwise, false.

IsReference

Gets or sets whether this type contract is serialized as a reference.

public bool? IsReference { get; set; }

Property Value

bool?

Whether this type contract is serialized as a reference.

OnDeserialized

Gets or sets the method called immediately after deserialization of the object.

public MethodInfo OnDeserialized { get; set; }

Property Value

MethodInfo

The method called immediately after deserialization of the object.

OnDeserializing

Gets or sets the method called during deserialization of the object.

public MethodInfo OnDeserializing { get; set; }

Property Value

MethodInfo

The method called during deserialization of the object.

OnError

Gets or sets the method called when an error is thrown during the serialization of the object.

public MethodInfo OnError { get; set; }

Property Value

MethodInfo

The method called when an error is thrown during the serialization of the object.

OnSerialized

Gets or sets the method called after serialization of the object graph.

public MethodInfo OnSerialized { get; set; }

Property Value

MethodInfo

The method called after serialization of the object graph.

OnSerializing

Gets or sets the method called before serialization of the object.

public MethodInfo OnSerializing { get; set; }

Property Value

MethodInfo

The method called before serialization of the object.

UnderlyingType

Gets the underlying type for the contract.

public Type UnderlyingType { get; }

Property Value

Type

The underlying type for the contract.