Click or drag to resize
Json.NET

JsonSerializerSettings Class

 
Specifies the settings on a JsonSerializer object.
Inheritance Hierarchy
SystemObject
  Newtonsoft.JsonJsonSerializerSettings

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

The JsonSerializerSettings type exposes the following members.

Constructors
  NameDescription
Public methodJsonSerializerSettings
Initializes a new instance of the JsonSerializerSettings class.
Top
Properties
  NameDescription
Public propertyBinder Obsolete.
Gets or sets the SerializationBinder used by the serializer when resolving type names.
Public propertyCheckAdditionalContent
Gets a value indicating whether there will be a check for additional content after deserializing an object. The default value is false.
Public propertyConstructorHandling
Gets or sets how constructors are used during deserialization. The default value is Default.
Public propertyContext
Gets or sets the StreamingContext used by the serializer when invoking serialization callback methods.
Public propertyContractResolver
Gets or sets the contract resolver used by the serializer when serializing .NET objects to JSON and vice versa.
Public propertyConverters
Gets or sets a JsonConverter collection that will be used during serialization.
Public propertyCulture
Gets or sets the culture used when reading JSON. The default value is InvariantCulture.
Public propertyDateFormatHandling
Gets or sets how dates are written to JSON text. The default value is IsoDateFormat.
Public propertyDateFormatString
Gets or sets how DateTime and DateTimeOffset values are formatted when writing JSON text, and the expected date format when reading JSON text. The default value is "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK".
Public propertyDateParseHandling
Gets or sets how date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed when reading JSON. The default value is DateTime.
Public propertyDateTimeZoneHandling
Gets or sets how DateTime time zones are handled during serialization and deserialization. The default value is RoundtripKind.
Public propertyDefaultValueHandling
Gets or sets how default values are handled during serialization and deserialization. The default value is Include.
Public propertyEqualityComparer
Gets or sets the equality comparer used by the serializer when comparing references.
Public propertyError
Gets or sets the error handler called during serialization and deserialization.
Public propertyFloatFormatHandling
Gets or sets how special floating point numbers, e.g. NaN, PositiveInfinity and NegativeInfinity, are written as JSON. The default value is String.
Public propertyFloatParseHandling
Gets or sets how floating point numbers, e.g. 1.0 and 9.9, are parsed when reading JSON text. The default value is Double.
Public propertyFormatting
Indicates how JSON text output is formatted. The default value is None.
Public propertyMaxDepth
Gets or sets the maximum depth allowed when reading JSON. Reading past this depth will throw a JsonReaderException. A null value means there is no maximum. The default value is null.
Public propertyMetadataPropertyHandling
Gets or sets how metadata properties are used during deserialization. The default value is Default.
Public propertyMissingMemberHandling
Gets or sets how missing members (e.g. JSON contains a property that isn't a member on the object) are handled during deserialization. The default value is Ignore.
Public propertyNullValueHandling
Gets or sets how null values are handled during serialization and deserialization. The default value is Include.
Public propertyObjectCreationHandling
Gets or sets how objects are created during deserialization. The default value is Auto.
Public propertyPreserveReferencesHandling
Gets or sets how object references are preserved by the serializer. The default value is None.
Public propertyReferenceLoopHandling
Gets or sets how reference loops (e.g. a class referencing itself) are handled. The default value is Error.
Public propertyReferenceResolver Obsolete.
Gets or sets the IReferenceResolver used by the serializer when resolving references.
Public propertyReferenceResolverProvider
Gets or sets a function that creates the IReferenceResolver used by the serializer when resolving references.
Public propertySerializationBinder
Gets or sets the ISerializationBinder used by the serializer when resolving type names.
Public propertyStringEscapeHandling
Gets or sets how strings are escaped when writing JSON text. The default value is Default.
Public propertyTraceWriter
Gets or sets the ITraceWriter used by the serializer when writing trace messages.
Public propertyTypeNameAssemblyFormat Obsolete.
Gets or sets how a type name assembly is written and resolved by the serializer. The default value is Simple.
Public propertyTypeNameAssemblyFormatHandling
Gets or sets how a type name assembly is written and resolved by the serializer. The default value is Simple.
Public propertyTypeNameHandling
Gets or sets how type name writing and reading is handled by the serializer. The default value is None.
Top
Methods
  NameDescription
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 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 methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
See Also