Click or drag to resize
Json.NET

DefaultContractResolver Class

 
Used by JsonSerializer to resolve a JsonContract for a given Type.
Inheritance Hierarchy

Namespace:  Newtonsoft.Json.Serialization
Assembly:  Newtonsoft.Json (in Newtonsoft.Json.dll) Version: 12.0.1+509643a8952ce731e0207710c429ad6e67dc43db
Syntax
C#
public class DefaultContractResolver : IContractResolver

The DefaultContractResolver type exposes the following members.

Constructors
  NameDescription
Public methodDefaultContractResolver
Initializes a new instance of the DefaultContractResolver class.
Top
Properties
  NameDescription
Public propertyDefaultMembersSearchFlags Obsolete.
Gets or sets the default members search flags.
Public propertyDynamicCodeGeneration
Gets a value indicating whether members are being get and set using dynamic code generation. This value is determined by the runtime permissions available.
Public propertyIgnoreIsSpecifiedMembers
Gets or sets a value indicating whether to ignore IsSpecified members when serializing and deserializing types.
Public propertyIgnoreSerializableAttribute
Gets or sets a value indicating whether to ignore the SerializableAttribute attribute when serializing and deserializing types.
Public propertyIgnoreSerializableInterface
Gets or sets a value indicating whether to ignore the ISerializable interface when serializing and deserializing types.
Public propertyIgnoreShouldSerializeMembers
Gets or sets a value indicating whether to ignore ShouldSerialize members when serializing and deserializing types.
Public propertyNamingStrategy
Gets or sets the naming strategy used to resolve how property names and dictionary keys are serialized.
Public propertySerializeCompilerGeneratedMembers
Gets or sets a value indicating whether compiler generated members should be serialized.
Top
Methods
  NameDescription
Protected methodCreateArrayContract
Creates a JsonArrayContract for the given type.
Protected methodCreateConstructorParameters
Creates the constructor parameters.
Protected methodCreateContract
Determines which contract type is created for the given type.
Protected methodCreateDictionaryContract
Creates a JsonDictionaryContract for the given type.
Protected methodCreateDynamicContract
Creates a JsonDynamicContract for the given type.
Protected methodCreateISerializableContract
Creates a JsonISerializableContract for the given type.
Protected methodCreateLinqContract
Creates a JsonLinqContract for the given type.
Protected methodCreateMemberValueProvider
Creates the IValueProvider used by the serializer to get and set values from a member.
Protected methodCreateObjectContract
Creates a JsonObjectContract for the given type.
Protected methodCreatePrimitiveContract
Creates a JsonPrimitiveContract for the given type.
Protected methodCreateProperties
Creates properties for the given JsonContract.
Protected methodCreateProperty
Creates a JsonProperty for the given MemberInfo.
Protected methodCreatePropertyFromConstructorParameter
Creates a JsonProperty for the given ParameterInfo.
Protected methodCreateStringContract
Creates a JsonStringContract for the given type.
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetResolvedPropertyName
Gets the resolved name of the property.
Protected methodGetSerializableMembers
Gets the serializable members for the type.
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodResolveContract
Resolves the contract for a given type.
Protected methodResolveContractConverter
Resolves the default JsonConverter for the contract.
Protected methodResolveDictionaryKey
Resolves the key of the dictionary. By default ResolvePropertyName(String) is used to resolve dictionary keys.
Protected methodResolveExtensionDataName
Resolves the name of the extension data. By default no changes are made to extension data names.
Protected methodResolvePropertyName
Resolves the name of the property.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
See Also