JsonSerializer Class

Json.NET

Json.NET - Quick Starts & API Documentation JsonSerializer Class
NamespacesNewtonsoft.JsonJsonSerializer
Serializes and deserializes objects into and from the JSON format. The JsonSerializer enables you to control how objects are encoded into JSON.
Declaration Syntax
C# Visual Basic Visual C++
public class JsonSerializer
Public Class JsonSerializer
public ref class JsonSerializer
Members
All Members Constructors Methods Properties Events



Icon Member Description
JsonSerializer()()()()
Initializes a new instance of the JsonSerializer class.

Binder
Gets or sets the SerializationBinder used by the serializer when resolving type names.

CheckAdditionalContent
Gets a value indicating whether there will be a check for additional JSON content after deserializing an object.

ConstructorHandling
Gets or sets how constructors are used during deserialization.

Context
Gets or sets the StreamingContext used by the serializer when invoking serialization callback methods.

ContractResolver
Gets or sets the contract resolver used by the serializer when serializing .NET objects to JSON and vice versa.

Converters
Gets a collection JsonConverter that will be used during serialization.

Create(JsonSerializerSettings)
Creates a new JsonSerializer instance using the specified JsonSerializerSettings.

Culture
Gets or sets the culture used when reading JSON. Defaults to InvariantCulture.

DateFormatHandling
Get or set how dates are written to JSON text.

DateParseHandling
Get or set how date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed when reading JSON.

DateTimeZoneHandling
Get or set how DateTime time zones are handling during serialization and deserialization.

DefaultValueHandling
Get or set how null default are handled during serialization and deserialization.

Deserialize(JsonReader)
Deserializes the Json structure contained by the specified JsonReader.

Deserialize(TextReader, Type)
Deserializes the Json structure contained by the specified StringReader into an instance of the specified type.

Deserialize<(Of <<'(T>)>>)(JsonReader)
Deserializes the Json structure contained by the specified JsonReader into an instance of the specified type.

Deserialize(JsonReader, Type)
Deserializes the Json structure contained by the specified JsonReader into an instance of the specified type.

Equals(Object)
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Error
Occurs when the JsonSerializer errors during serialization and deserialization.

Finalize()()()()
Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
(Inherited from Object.)
Formatting
Indicates how JSON text output is formatted.

GetHashCode()()()()
Serves as a hash function for a particular type.
(Inherited from Object.)
GetType()()()()
Gets the Type of the current instance.
(Inherited from Object.)
MaxDepth
Gets or sets the maximum depth allowed when reading JSON. Reading past this depth will throw a JsonReaderException.

MemberwiseClone()()()()
Creates a shallow copy of the current Object.
(Inherited from Object.)
MissingMemberHandling
Get or set how missing members (e.g. JSON contains a property that isn't a member on the object) are handled during deserialization.

NullValueHandling
Get or set how null values are handled during serialization and deserialization.

ObjectCreationHandling
Gets or sets how objects are created during deserialization.

Populate(TextReader, Object)
Populates the JSON values onto the target object.

Populate(JsonReader, Object)
Populates the JSON values onto the target object.

PreserveReferencesHandling
Gets or sets how object references are preserved by the serializer.

ReferenceLoopHandling
Get or set how reference loops (e.g. a class referencing itself) is handled.

ReferenceResolver
Gets or sets the IReferenceResolver used by the serializer when resolving references.

Serialize(TextWriter, Object)
Serializes the specified Object and writes the Json structure to a Stream using the specified TextWriter.

Serialize(JsonWriter, Object)
Serializes the specified Object and writes the Json structure to a Stream using the specified JsonWriter.

ToString()()()()
Returns a String that represents the current Object.
(Inherited from Object.)
TypeNameAssemblyFormat
Gets or sets how a type name assembly is written and resolved by the serializer.

TypeNameHandling
Gets or sets how type name writing and reading is handled by the serializer.

Inheritance Hierarchy
Object
JsonSerializer

Assembly: Newtonsoft.Json (Module: Newtonsoft.Json) Version: 4.5.0.0 (4.5.6.14930)