Constructors
-
Json
Serializer() Initializes a new instance of the JsonSerializer class.
Methods
- Create() static Creates a new JsonSerializer instance. The JsonSerializer will not use default settings from DefaultSettings.
-
Create(Json
Serializer static Creates a new JsonSerializer instance using the specified JsonSerializerSettings. The JsonSerializer will not use default settings from DefaultSettings.Settings) -
Create
Default() static Creates a new JsonSerializer instance. The JsonSerializer will use default settings from DefaultSettings. -
Create
Default(Json static Creates a new JsonSerializer instance using the specified JsonSerializerSettings. The JsonSerializer will use default settings from DefaultSettings as well as the specified JsonSerializerSettings.Serializer Settings) -
Deserialize(Json
Reader) Deserializes the JSON structure contained by the specified JsonReader. -
Deserialize(Json
Reader, Deserializes the JSON structure contained by the specified JsonReader into an instance of the specified type.Type) -
Deserialize(Text
Reader, Deserializes the JSON structure contained by the specified TextReader into an instance of the specified type.Type) -
Deserialize``1(Json
Reader) Deserializes the JSON structure contained by the specified JsonReader into an instance of the specified type. -
Populate(Json
Reader, Populates the JSON values onto the target object.Object) -
Populate(Text
Reader, Populates the JSON values onto the target object.Object) -
Serialize(Json
Writer, Serializes the specified Object and writes the JSON structure using the specified JsonWriter.Object) -
Serialize(Json
Writer, Serializes the specified Object and writes the JSON structure using the specified JsonWriter.Object, Type) -
Serialize(Text
Writer, Serializes the specified Object and writes the JSON structure using the specified TextWriter.Object) -
Serialize(Text
Writer, Serializes the specified Object and writes the JSON structure using the specified TextWriter.Object, Type)
Properties
- Binder virtual Gets or sets the SerializationBinder used by the serializer when resolving type names.
-
Check
Additional virtual Gets a value indicating whether there will be a check for additional JSON content after deserializing an object. The default value is false.Content -
Constructor
Handling virtual Gets or sets how constructors are used during deserialization. The default value is Default. - Context virtual Gets or sets the StreamingContext used by the serializer when invoking serialization callback methods.
-
Contract
Resolver virtual Gets or sets the contract resolver used by the serializer when serializing .NET objects to JSON and vice versa. - Converters virtual Gets a collection JsonConverter that will be used during serialization.
- Culture virtual Gets or sets the culture used when reading JSON. The default value is InvariantCulture.
-
Date
Format virtual Gets or sets how dates are written to JSON text. The default value is IsoDateFormat.Handling -
Date
Format virtual 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".String -
Date
Parse virtual 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.Handling -
Date
Time virtual Gets or sets how DateTime time zones are handled during serialization and deserialization. The default value is RoundtripKind.Zone Handling -
Default
Value virtual Gets or sets how default values are handled during serialization and deserialization. The default value is Include.Handling -
Equality
Comparer virtual Gets or sets the equality comparer used by the serializer when comparing references. -
Float
Format virtual Gets or sets how special floating point numbers, e.g. NaN, PositiveInfinity and NegativeInfinity, are written as JSON text. The default value is String.Handling -
Float
Parse virtual 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.Handling - Formatting virtual Indicates how JSON text output is formatted. The default value is None.
-
Max
Depth virtual 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. -
Metadata
Property virtual Gets or sets how metadata properties are used during deserialization. The default value is Default.Handling -
Missing
Member virtual 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.Handling -
Null
Value virtual Gets or sets how null values are handled during serialization and deserialization. The default value is Include.Handling -
Object
Creation virtual Gets or sets how objects are created during deserialization. The default value is Auto.Handling -
Preserve
References virtual Gets or sets how object references are preserved by the serializer. The default value is None.Handling -
Reference
Loop virtual Gets or sets how reference loops (e.g. a class referencing itself) is handled. The default value is Error.Handling -
Reference
Resolver virtual Gets or sets the IReferenceResolver used by the serializer when resolving references. -
Serialization
Binder virtual Gets or sets the ISerializationBinder used by the serializer when resolving type names. -
String
Escape virtual Gets or sets how strings are escaped when writing JSON text. The default value is Default.Handling -
Trace
Writer virtual Gets or sets the ITraceWriter used by the serializer when writing trace messages. -
Type
Name virtual Gets or sets how a type name assembly is written and resolved by the serializer. The default value is Simple.Assembly Format -
Type
Name virtual Gets or sets how a type name assembly is written and resolved by the serializer. The default value is Simple.Assembly Format Handling -
Type
Name virtual Gets or sets how type name writing and reading is handled by the serializer. The default value is None.Handling
Events
- Error virtual Occurs when the JsonSerializer errors during serialization and deserialization.