Early Preview
This is currently very much a preview. Please feel free to try things out,
but don't be upset if anything is not yet working. Feedback is welcome over on our
GitHub Dicussions page.
class Newtonsoft.​Json.​JsonSerializerSettings
Assembly: Newtonsoft.Json
Inheritance: object → JsonSerializerSettings
Specifies the settings on a <see cref="T:Newtonsoft.Json.JsonSerializer" /> object.
Properties
public
ReferenceLoopHandling
ReferenceLoopHandling
Gets or sets how reference loops (e.g. a class referencing itself) are handled.
public
MissingMemberHandling
MissingMemberHandling
Gets or sets how missing members (e.g. JSON contains a property that isn't a member on the object) are handled during deserialization.
public
ObjectCreationHandling
ObjectCreationHandling
Gets or sets how objects are created during deserialization.
public
NullValueHandling
NullValueHandling
Gets or sets how null values are handled during serialization and deserialization.
public
DefaultValueHandling
DefaultValueHandling
Gets or sets how default values are handled during serialization and deserialization.
public
System.​Collections.​Generic.​IList<​JsonConverter>
Converters
Gets or sets a <see cref="T:Newtonsoft.Json.JsonConverter" /> collection that will be used during serialization.
public
PreserveReferencesHandling
PreserveReferencesHandling
Gets or sets how object references are preserved by the serializer.
public
TypeNameHandling
TypeNameHandling
Gets or sets how type name writing and reading is handled by the serializer.
Remarks <see cref="P:Newtonsoft.Json.JsonSerializerSettings.TypeNameHandling" /> should be used with caution when your application deserializes JSON from an external source.
Incoming types should be validated with a custom <see cref="P:Newtonsoft.Json.JsonSerializerSettings.SerializationBinder" />
when deserializing with a value other than <see cref="F:Newtonsoft.Json.TypeNameHandling.None" /> .
public
MetadataPropertyHandling
MetadataPropertyHandling
Gets or sets how metadata properties are used during deserialization.
TypeNameAssemblyFormat
Gets or sets how a type name assembly is written and resolved by the serializer.
TypeNameAssemblyFormatHandling
Gets or sets how a type name assembly is written and resolved by the serializer.
public
ConstructorHandling
ConstructorHandling
Gets or sets how constructors are used during deserialization.
public
IContractResolver
ContractResolver
Gets or sets the contract resolver used by the serializer when
serializing .NET objects to JSON and vice versa.
EqualityComparer
Gets or sets the equality comparer used by the serializer when comparing references.
public
IReferenceResolver
ReferenceResolver
Gets or sets the <see cref="T:Newtonsoft.Json.Serialization.IReferenceResolver" /> used by the serializer when resolving references.
public
System.​Func<​IReferenceResolver>
ReferenceResolverProvider
Gets or sets a function that creates the <see cref="T:Newtonsoft.Json.Serialization.IReferenceResolver" /> used by the serializer when resolving references.
public
ITraceWriter
TraceWriter
Gets or sets the <see cref="T:Newtonsoft.Json.Serialization.ITraceWriter" /> used by the serializer when writing trace messages.
public
SerializationBinder
Binder
Gets or sets the <see cref="P:Newtonsoft.Json.JsonSerializerSettings.SerializationBinder" /> used by the serializer when resolving type names.
public
ISerializationBinder
SerializationBinder
Gets or sets the <see cref="T:Newtonsoft.Json.Serialization.ISerializationBinder" /> used by the serializer when resolving type names.
public
System.​EventHandler<​ErrorEventArgs>
Error
Gets or sets the error handler called during serialization and deserialization.
public
System.​Runtime.​Serialization.​StreamingContext
Context
Gets or sets the <see cref="T:System.Runtime.Serialization.StreamingContext" /> used by the serializer when invoking serialization callback methods.
public
string
DateFormatString
Gets or sets how <see cref="T:System.DateTime" /> and <see cref="T:System.DateTimeOffset" /> values are formatted when writing JSON text,
and the expected date format when reading JSON text.
public
int?
MaxDepth
Gets or sets the maximum depth allowed when reading JSON. Reading past this depth will throw a <see cref="T:Newtonsoft.Json.JsonReaderException" /> .
public
Formatting
Formatting
Indicates how JSON text output is formatted.
public
DateFormatHandling
DateFormatHandling
Gets or sets how dates are written to JSON text.
public
DateTimeZoneHandling
DateTimeZoneHandling
Gets or sets how <see cref="T:System.DateTime" /> time zones are handled during serialization and deserialization.
public
DateParseHandling
DateParseHandling
Gets or sets how date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed when reading JSON.
public
FloatFormatHandling
FloatFormatHandling
Gets or sets how special floating point numbers, e.g. <see cref="F:System.Double.NaN" /> ,
<see cref="F:System.Double.PositiveInfinity" /> and <see cref="F:System.Double.NegativeInfinity" /> ,
are written as JSON.
public
FloatParseHandling
FloatParseHandling
Gets or sets how floating point numbers, e.g. 1.0 and 9.9, are parsed when reading JSON text.
public
StringEscapeHandling
StringEscapeHandling
Gets or sets how strings are escaped when writing JSON text.
Gets or sets the culture used when reading JSON. Defaults to <see cref="P:System.Globalization.CultureInfo.InvariantCulture" /> .
public
bool
CheckAdditionalContent
Gets a value indicating whether there will be a check for additional content after deserializing an object.
Methods
public
bool
Equals​(object obj)
Inherited from object
protected
void
Finalize​()
Inherited from object
public
int
GetHashCode​()
Inherited from object
protected
object
MemberwiseClone​()
Inherited from object
public
string
ToString​()
Inherited from object