Newtonsoft.Json by James Newton-King

<PackageReference Include="Newtonsoft.Json" Version="10.0.3" />

 JsonSerializer

public class JsonSerializer
Serializes and deserializes objects into and from the JSON format. The JsonSerializer enables you to control how objects are encoded into JSON.
public virtual SerializationBinder Binder { get; set; }

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

public virtual bool CheckAdditionalContent { get; set; }

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

public virtual ConstructorHandling ConstructorHandling { get; set; }

Gets or sets how constructors are used during deserialization.

public virtual StreamingContext Context { get; set; }

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

public virtual IContractResolver ContractResolver { get; set; }

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

public virtual JsonConverterCollection Converters { get; }

Gets a collection JsonConverter that will be used during serialization.

public virtual CultureInfo Culture { get; set; }

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

public virtual DateFormatHandling DateFormatHandling { get; set; }

Gets or sets how dates are written to JSON text.

public virtual string DateFormatString { get; set; }

Gets or sets how DateTime and DateTimeOffset values are formatted when writing JSON text, and the expected date format when reading JSON text.

public virtual DateParseHandling DateParseHandling { get; set; }

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

public virtual DateTimeZoneHandling DateTimeZoneHandling { get; set; }

Gets or sets how DateTime time zones are handled during serialization and deserialization.

public virtual DefaultValueHandling DefaultValueHandling { get; set; }

Gets or sets how default values are handled during serialization and deserialization.

public virtual IEqualityComparer EqualityComparer { get; set; }

Gets or sets the equality comparer used by the serializer when comparing references.

public virtual FloatFormatHandling FloatFormatHandling { get; set; }

Gets or sets how special floating point numbers, e.g. NaN, PositiveInfinity and NegativeInfinity, are written as JSON text.

public virtual FloatParseHandling FloatParseHandling { get; set; }

Gets or sets how floating point numbers, e.g. 1.0 and 9.9, are parsed when reading JSON text.

public virtual Formatting Formatting { get; set; }

Indicates how JSON text output is formatted.

public virtual int? MaxDepth { get; set; }

Gets or sets the maximum depth allowed when reading JSON. Reading past this depth will throw a JsonReaderException.

Gets or sets how metadata properties are used during deserialization.

public virtual MissingMemberHandling MissingMemberHandling { get; set; }

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 virtual NullValueHandling NullValueHandling { get; set; }

Gets or sets how null values are handled during serialization and deserialization.

public virtual ObjectCreationHandling ObjectCreationHandling { get; set; }

Gets or sets how objects are created during deserialization.

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

public virtual ReferenceLoopHandling ReferenceLoopHandling { get; set; }

Gets or sets how reference loops (e.g. a class referencing itself) is handled.

public virtual IReferenceResolver ReferenceResolver { get; set; }

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

public virtual ISerializationBinder SerializationBinder { get; set; }

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

public virtual StringEscapeHandling StringEscapeHandling { get; set; }

Gets or sets how strings are escaped when writing JSON text.

public virtual ITraceWriter TraceWriter { get; set; }

Gets or sets the ITraceWriter used by the serializer when writing trace messages.

public virtual FormatterAssemblyStyle TypeNameAssemblyFormat { get; set; }

Gets or sets how a type name assembly is written and resolved by the serializer.

Gets or sets how a type name assembly is written and resolved by the serializer.

public virtual TypeNameHandling TypeNameHandling { get; set; }

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

Occurs when the JsonSerializer errors during serialization and deserialization.

public JsonSerializer()

Initializes a new instance of the JsonSerializer class.

public static JsonSerializer Create()

Creates a new JsonSerializer instance. The JsonSerializer will not use default settings from DefaultSettings.

Creates a new JsonSerializer instance using the specified JsonSerializerSettings. The JsonSerializer will not use default settings from DefaultSettings.

public static JsonSerializer CreateDefault()

Creates a new JsonSerializer instance. The JsonSerializer will use default settings from DefaultSettings.

Creates a new JsonSerializer instance using the specified JsonSerializerSettings. The JsonSerializer will use default settings from DefaultSettings as well as the specified JsonSerializerSettings.

public object Deserialize(JsonReader reader)

Deserializes the JSON structure contained by the specified JsonReader.

public object Deserialize(TextReader reader, Type objectType)

Deserializes the JSON structure contained by the specified StringReader into an instance of the specified type.

public T Deserialize<T>(JsonReader reader)

Deserializes the JSON structure contained by the specified JsonReader into an instance of the specified type.

public object Deserialize(JsonReader reader, Type objectType)

Deserializes the JSON structure contained by the specified JsonReader into an instance of the specified type.

public void Populate(TextReader reader, object target)

Populates the JSON values onto the target object.

public void Populate(JsonReader reader, object target)

Populates the JSON values onto the target object.

public void Serialize(TextWriter textWriter, object value)

Serializes the specified Object and writes the JSON structure using the specified TextWriter.

public void Serialize(JsonWriter jsonWriter, object value, Type objectType)

Serializes the specified Object and writes the JSON structure using the specified JsonWriter.

public void Serialize(TextWriter textWriter, object value, Type objectType)

Serializes the specified Object and writes the JSON structure using the specified TextWriter.

public void Serialize(JsonWriter jsonWriter, object value)

Serializes the specified Object and writes the JSON structure using the specified JsonWriter.