-Documentation
This commit is contained in:
@@ -42,7 +42,6 @@ using System.Data;
|
||||
using System.Data.SqlTypes;
|
||||
using System.Linq;
|
||||
using Newtonsoft.Json.Tests.TestObjects;
|
||||
using System.Linq;
|
||||
#if !(NET20 || NET35)
|
||||
using System.Numerics;
|
||||
#endif
|
||||
|
||||
@@ -174,6 +174,7 @@ namespace Newtonsoft.Json
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets how type name writing and reading is handled by the serializer.
|
||||
/// The default value is <see cref="Json.TypeNameHandling.None" />.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <see cref="JsonSerializer.TypeNameHandling"/> should be used with caution when your application deserializes JSON from an external source.
|
||||
@@ -196,6 +197,7 @@ namespace Newtonsoft.Json
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets how a type name assembly is written and resolved by the serializer.
|
||||
/// The default value is <see cref="FormatterAssemblyStyle.Simple" />.
|
||||
/// </summary>
|
||||
/// <value>The type name assembly format.</value>
|
||||
[Obsolete("TypeNameAssemblyFormat is obsolete. Use TypeNameAssemblyFormatHandling instead.")]
|
||||
@@ -215,6 +217,7 @@ namespace Newtonsoft.Json
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets how a type name assembly is written and resolved by the serializer.
|
||||
/// The default value is <see cref="Json.TypeNameAssemblyFormatHandling.Simple" />.
|
||||
/// </summary>
|
||||
/// <value>The type name assembly format.</value>
|
||||
public virtual TypeNameAssemblyFormatHandling TypeNameAssemblyFormatHandling
|
||||
@@ -233,6 +236,7 @@ namespace Newtonsoft.Json
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets how object references are preserved by the serializer.
|
||||
/// The default value is <see cref="Json.PreserveReferencesHandling.None" />.
|
||||
/// </summary>
|
||||
public virtual PreserveReferencesHandling PreserveReferencesHandling
|
||||
{
|
||||
@@ -250,6 +254,7 @@ namespace Newtonsoft.Json
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets how reference loops (e.g. a class referencing itself) is handled.
|
||||
/// The default value is <see cref="Json.ReferenceLoopHandling.Error" />.
|
||||
/// </summary>
|
||||
public virtual ReferenceLoopHandling ReferenceLoopHandling
|
||||
{
|
||||
@@ -267,6 +272,7 @@ namespace Newtonsoft.Json
|
||||
|
||||
/// <summary>
|
||||
/// 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 <see cref="Json.MissingMemberHandling.Ignore" />.
|
||||
/// </summary>
|
||||
public virtual MissingMemberHandling MissingMemberHandling
|
||||
{
|
||||
@@ -284,6 +290,7 @@ namespace Newtonsoft.Json
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets how null values are handled during serialization and deserialization.
|
||||
/// The default value is <see cref="Json.NullValueHandling.Include" />.
|
||||
/// </summary>
|
||||
public virtual NullValueHandling NullValueHandling
|
||||
{
|
||||
@@ -301,6 +308,7 @@ namespace Newtonsoft.Json
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets how default values are handled during serialization and deserialization.
|
||||
/// The default value is <see cref="Json.DefaultValueHandling.Include" />.
|
||||
/// </summary>
|
||||
public virtual DefaultValueHandling DefaultValueHandling
|
||||
{
|
||||
@@ -318,6 +326,7 @@ namespace Newtonsoft.Json
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets how objects are created during deserialization.
|
||||
/// The default value is <see cref="Json.ObjectCreationHandling.Auto" />.
|
||||
/// </summary>
|
||||
/// <value>The object creation handling.</value>
|
||||
public virtual ObjectCreationHandling ObjectCreationHandling
|
||||
@@ -336,6 +345,7 @@ namespace Newtonsoft.Json
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets how constructors are used during deserialization.
|
||||
/// The default value is <see cref="Json.ConstructorHandling.Default" />.
|
||||
/// </summary>
|
||||
/// <value>The constructor handling.</value>
|
||||
public virtual ConstructorHandling ConstructorHandling
|
||||
@@ -354,6 +364,7 @@ namespace Newtonsoft.Json
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets how metadata properties are used during deserialization.
|
||||
/// The default value is <see cref="Json.MetadataPropertyHandling.Default" />.
|
||||
/// </summary>
|
||||
/// <value>The metadata properties handling.</value>
|
||||
public virtual MetadataPropertyHandling MetadataPropertyHandling
|
||||
@@ -409,6 +420,7 @@ namespace Newtonsoft.Json
|
||||
|
||||
/// <summary>
|
||||
/// Indicates how JSON text output is formatted.
|
||||
/// The default value is <see cref="Json.Formatting.None" />.
|
||||
/// </summary>
|
||||
public virtual Formatting Formatting
|
||||
{
|
||||
@@ -418,6 +430,7 @@ namespace Newtonsoft.Json
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets how dates are written to JSON text.
|
||||
/// The default value is <see cref="Json.DateFormatHandling.IsoDateFormat" />.
|
||||
/// </summary>
|
||||
public virtual DateFormatHandling DateFormatHandling
|
||||
{
|
||||
@@ -427,6 +440,7 @@ namespace Newtonsoft.Json
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets how <see cref="DateTime"/> time zones are handled during serialization and deserialization.
|
||||
/// The default value is <see cref="Json.DateTimeZoneHandling.RoundtripKind" />.
|
||||
/// </summary>
|
||||
public virtual DateTimeZoneHandling DateTimeZoneHandling
|
||||
{
|
||||
@@ -436,6 +450,7 @@ namespace Newtonsoft.Json
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets how date formatted strings, e.g. <c>"\/Date(1198908717056)\/"</c> and <c>"2012-03-21T05:40Z"</c>, are parsed when reading JSON.
|
||||
/// The default value is <see cref="Json.DateParseHandling.DateTime" />.
|
||||
/// </summary>
|
||||
public virtual DateParseHandling DateParseHandling
|
||||
{
|
||||
@@ -445,6 +460,7 @@ namespace Newtonsoft.Json
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets how floating point numbers, e.g. 1.0 and 9.9, are parsed when reading JSON text.
|
||||
/// The default value is <see cref="Json.FloatParseHandling.Double" />.
|
||||
/// </summary>
|
||||
public virtual FloatParseHandling FloatParseHandling
|
||||
{
|
||||
@@ -456,6 +472,7 @@ namespace Newtonsoft.Json
|
||||
/// Gets or sets how special floating point numbers, e.g. <see cref="Double.NaN"/>,
|
||||
/// <see cref="Double.PositiveInfinity"/> and <see cref="Double.NegativeInfinity"/>,
|
||||
/// are written as JSON text.
|
||||
/// The default value is <see cref="Json.FloatFormatHandling.String" />.
|
||||
/// </summary>
|
||||
public virtual FloatFormatHandling FloatFormatHandling
|
||||
{
|
||||
@@ -465,6 +482,7 @@ namespace Newtonsoft.Json
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets how strings are escaped when writing JSON text.
|
||||
/// The default value is <see cref="Json.StringEscapeHandling.Default" />.
|
||||
/// </summary>
|
||||
public virtual StringEscapeHandling StringEscapeHandling
|
||||
{
|
||||
@@ -475,6 +493,7 @@ namespace Newtonsoft.Json
|
||||
/// <summary>
|
||||
/// Gets or sets how <see cref="DateTime"/> and <see cref="DateTimeOffset"/> values are formatted when writing JSON text,
|
||||
/// and the expected date format when reading JSON text.
|
||||
/// The default value is <c>"yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK"</c>.
|
||||
/// </summary>
|
||||
public virtual string DateFormatString
|
||||
{
|
||||
@@ -487,7 +506,8 @@ namespace Newtonsoft.Json
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the culture used when reading JSON. Defaults to <see cref="CultureInfo.InvariantCulture"/>.
|
||||
/// Gets or sets the culture used when reading JSON.
|
||||
/// The default value is <see cref="CultureInfo.InvariantCulture"/>.
|
||||
/// </summary>
|
||||
public virtual CultureInfo Culture
|
||||
{
|
||||
@@ -497,6 +517,8 @@ namespace Newtonsoft.Json
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the maximum depth allowed when reading JSON. Reading past this depth will throw a <see cref="JsonReaderException"/>.
|
||||
/// A null value means there is no maximum.
|
||||
/// The default value is <c>null</c>.
|
||||
/// </summary>
|
||||
public virtual int? MaxDepth
|
||||
{
|
||||
@@ -515,6 +537,7 @@ namespace Newtonsoft.Json
|
||||
|
||||
/// <summary>
|
||||
/// Gets a value indicating whether there will be a check for additional JSON content after deserializing an object.
|
||||
/// The default value is <c>false</c>.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// <c>true</c> if there will be a check for additional JSON content after deserializing an object; otherwise, <c>false</c>.
|
||||
|
||||
@@ -88,7 +88,7 @@ namespace Newtonsoft.Json
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets how reference loops (e.g. a class referencing itself) are handled.
|
||||
/// By default errors if a reference loop is encountered.
|
||||
/// The default value is <see cref="Json.ReferenceLoopHandling.Error" />.
|
||||
/// </summary>
|
||||
/// <value>Reference loop handling.</value>
|
||||
public ReferenceLoopHandling ReferenceLoopHandling
|
||||
@@ -99,7 +99,7 @@ namespace Newtonsoft.Json
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets how missing members (e.g. JSON contains a property that isn't a member on the object) are handled during deserialization.
|
||||
/// By default ignores missing members.
|
||||
/// The default value is <see cref="Json.MissingMemberHandling.Ignore" />.
|
||||
/// </summary>
|
||||
/// <value>Missing member handling.</value>
|
||||
public MissingMemberHandling MissingMemberHandling
|
||||
@@ -110,7 +110,7 @@ namespace Newtonsoft.Json
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets how objects are created during deserialization.
|
||||
/// By default attempts to set JSON values onto existing objects and add JSON values to existing collections during deserialization.
|
||||
/// The default value is <see cref="Json.ObjectCreationHandling.Auto" />.
|
||||
/// </summary>
|
||||
/// <value>The object creation handling.</value>
|
||||
public ObjectCreationHandling ObjectCreationHandling
|
||||
@@ -121,7 +121,7 @@ namespace Newtonsoft.Json
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets how null values are handled during serialization and deserialization.
|
||||
/// By default writes null values to JSON when serializing and sets null values to fields/properties when deserializing.
|
||||
/// The default value is <see cref="Json.NullValueHandling.Include" />.
|
||||
/// </summary>
|
||||
/// <value>Null value handling.</value>
|
||||
public NullValueHandling NullValueHandling
|
||||
@@ -132,8 +132,7 @@ namespace Newtonsoft.Json
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets how default values are handled during serialization and deserialization.
|
||||
/// By default writes a field/property value to JSON when serializing if the value is the same as the field/property's default value.
|
||||
/// The deserializer will continue setting a field/property if the JSON value is the same as the default value.
|
||||
/// The default value is <see cref="Json.DefaultValueHandling.Include" />.
|
||||
/// </summary>
|
||||
/// <value>The default value handling.</value>
|
||||
public DefaultValueHandling DefaultValueHandling
|
||||
@@ -150,7 +149,7 @@ namespace Newtonsoft.Json
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets how object references are preserved by the serializer.
|
||||
/// By default does not preserves references when serializing types.
|
||||
/// The default value is <see cref="Json.PreserveReferencesHandling.None" />.
|
||||
/// </summary>
|
||||
/// <value>The preserve references handling.</value>
|
||||
public PreserveReferencesHandling PreserveReferencesHandling
|
||||
@@ -161,12 +160,12 @@ namespace Newtonsoft.Json
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets how type name writing and reading is handled by the serializer.
|
||||
/// By default does not read or write type names during deserialization.
|
||||
/// The default value is <see cref="Json.TypeNameHandling.None" />.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <see cref="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="JsonSerializerSettings.SerializationBinder"/>
|
||||
/// when deserializing with a value other than <see cref="TypeNameHandling.None"/>.
|
||||
/// when deserializing with a value other than <see cref="Json.TypeNameHandling.None"/>.
|
||||
/// </remarks>
|
||||
/// <value>The type name handling.</value>
|
||||
public TypeNameHandling TypeNameHandling
|
||||
@@ -177,7 +176,7 @@ namespace Newtonsoft.Json
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets how metadata properties are used during deserialization.
|
||||
/// By default reads the metadata properties located at the start of a JSON object.
|
||||
/// The default value is <see cref="Json.MetadataPropertyHandling.Default" />.
|
||||
/// </summary>
|
||||
/// <value>The metadata properties handling.</value>
|
||||
public MetadataPropertyHandling MetadataPropertyHandling
|
||||
@@ -188,7 +187,7 @@ namespace Newtonsoft.Json
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets how a type name assembly is written and resolved by the serializer.
|
||||
/// By default writes the partial assembly name with the type.
|
||||
/// The default value is <see cref="FormatterAssemblyStyle.Simple" />.
|
||||
/// </summary>
|
||||
/// <value>The type name assembly format.</value>
|
||||
[Obsolete("TypeNameAssemblyFormat is obsolete. Use TypeNameAssemblyFormatHandling instead.")]
|
||||
@@ -200,7 +199,7 @@ namespace Newtonsoft.Json
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets how a type name assembly is written and resolved by the serializer.
|
||||
/// By default the assembly used during deserialization need not match exactly the assembly used during serialization.
|
||||
/// The default value is <see cref="Json.TypeNameAssemblyFormatHandling.Simple" />.
|
||||
/// </summary>
|
||||
/// <value>The type name assembly format.</value>
|
||||
public TypeNameAssemblyFormatHandling TypeNameAssemblyFormatHandling
|
||||
@@ -211,11 +210,7 @@ namespace Newtonsoft.Json
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets how constructors are used during deserialization.
|
||||
/// By default first looks for a constructor marked with the JsonConstructorAttribute, then look for a public default constructor
|
||||
/// (a constructor that doesn't take any arguments), then check if the class has a single public constructor with arguments
|
||||
/// and finally check for a non-public default constructor.
|
||||
/// If the class has multiple public constructors with arguments an error will be thrown.
|
||||
/// This can be fixed by marking one of the constructors with the JsonConstructorAttribute.
|
||||
/// The default value is <see cref="Json.ConstructorHandling.Default" />.
|
||||
/// </summary>
|
||||
/// <value>The constructor handling.</value>
|
||||
public ConstructorHandling ConstructorHandling
|
||||
@@ -318,7 +313,7 @@ namespace Newtonsoft.Json
|
||||
/// <summary>
|
||||
/// Gets or sets how <see cref="DateTime"/> and <see cref="DateTimeOffset"/> values are formatted when writing JSON text,
|
||||
/// and the expected date format when reading JSON text.
|
||||
/// By default uses the format "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK"
|
||||
/// The default value is <c>"yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK"</c>.
|
||||
/// </summary>
|
||||
public string DateFormatString
|
||||
{
|
||||
@@ -332,6 +327,8 @@ namespace Newtonsoft.Json
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the maximum depth allowed when reading JSON. Reading past this depth will throw a <see cref="JsonReaderException"/>.
|
||||
/// A null value means there is no maximum.
|
||||
/// The default value is <c>null</c>.
|
||||
/// </summary>
|
||||
public int? MaxDepth
|
||||
{
|
||||
@@ -350,7 +347,7 @@ namespace Newtonsoft.Json
|
||||
|
||||
/// <summary>
|
||||
/// Indicates how JSON text output is formatted.
|
||||
/// By default no special formatting is applied.
|
||||
/// The default value is <see cref="Json.Formatting.None" />.
|
||||
/// </summary>
|
||||
public Formatting Formatting
|
||||
{
|
||||
@@ -360,7 +357,7 @@ namespace Newtonsoft.Json
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets how dates are written to JSON text.
|
||||
/// By default writes dates in ISO 8601 format.
|
||||
/// The default value is <see cref="Json.DateFormatHandling.IsoDateFormat" />.
|
||||
/// </summary>
|
||||
public DateFormatHandling DateFormatHandling
|
||||
{
|
||||
@@ -370,7 +367,7 @@ namespace Newtonsoft.Json
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets how <see cref="DateTime"/> time zones are handled during serialization and deserialization.
|
||||
/// By default time zone information is preserved when converting.
|
||||
/// The default value is <see cref="Json.DateTimeZoneHandling.RoundtripKind" />.
|
||||
/// </summary>
|
||||
public DateTimeZoneHandling DateTimeZoneHandling
|
||||
{
|
||||
@@ -379,8 +376,8 @@ namespace Newtonsoft.Json
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets how date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed when reading JSON.
|
||||
/// By default dates are parsed to <see cref="DateTime"/>
|
||||
/// Gets or sets how date formatted strings, e.g. <c>"\/Date(1198908717056)\/"</c> and <c>"2012-03-21T05:40Z"</c>, are parsed when reading JSON.
|
||||
/// The default value is <see cref="Json.DateParseHandling.DateTime" />.
|
||||
/// </summary>
|
||||
public DateParseHandling DateParseHandling
|
||||
{
|
||||
@@ -392,7 +389,7 @@ namespace Newtonsoft.Json
|
||||
/// Gets or sets how special floating point numbers, e.g. <see cref="Double.NaN"/>,
|
||||
/// <see cref="Double.PositiveInfinity"/> and <see cref="Double.NegativeInfinity"/>,
|
||||
/// are written as JSON.
|
||||
/// By default writes special floating point values as strings in JSON, e.g. <c>"NaN"</c>, <c>"Infinity"</c>, <c>"-Infinity"</c>.
|
||||
/// The default value is <see cref="Json.FloatFormatHandling.String" />.
|
||||
/// </summary>
|
||||
public FloatFormatHandling FloatFormatHandling
|
||||
{
|
||||
@@ -402,7 +399,7 @@ namespace Newtonsoft.Json
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets how floating point numbers, e.g. 1.0 and 9.9, are parsed when reading JSON text.
|
||||
/// By default floating point numbers are parsed to <see cref="Double"/>.
|
||||
/// The default value is <see cref="Json.FloatParseHandling.Double" />.
|
||||
/// </summary>
|
||||
public FloatParseHandling FloatParseHandling
|
||||
{
|
||||
@@ -412,7 +409,7 @@ namespace Newtonsoft.Json
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets how strings are escaped when writing JSON text.
|
||||
/// By default only control characters (e.g. newline) are escaped.
|
||||
/// The default value is <see cref="Json.StringEscapeHandling.Default" />.
|
||||
/// </summary>
|
||||
public StringEscapeHandling StringEscapeHandling
|
||||
{
|
||||
@@ -421,7 +418,8 @@ namespace Newtonsoft.Json
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the culture used when reading JSON. Defaults to <see cref="CultureInfo.InvariantCulture"/>.
|
||||
/// Gets or sets the culture used when reading JSON.
|
||||
/// The default value is <see cref="CultureInfo.InvariantCulture"/>.
|
||||
/// </summary>
|
||||
public CultureInfo Culture
|
||||
{
|
||||
@@ -431,7 +429,7 @@ namespace Newtonsoft.Json
|
||||
|
||||
/// <summary>
|
||||
/// Gets a value indicating whether there will be a check for additional content after deserializing an object.
|
||||
/// By default set to false.
|
||||
/// The default value is <c>false</c>.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// <c>true</c> if there will be a check for additional content after deserializing an object; otherwise, <c>false</c>.
|
||||
|
||||
Reference in New Issue
Block a user