Newtonsoft.Json by James Newton-King

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

 JsonConvert

public static class JsonConvert
Provides methods for converting between .NET types and JSON types.
public static readonly string False

Represents JavaScript's boolean value false as a string. This field is read-only.

public static readonly string NaN

Represents JavaScript's NaN as a string. This field is read-only.

public static readonly string NegativeInfinity

Represents JavaScript's negative infinity as a string. This field is read-only.

public static readonly string Null

Represents JavaScript's null as a string. This field is read-only.

public static readonly string PositiveInfinity

Represents JavaScript's positive infinity as a string. This field is read-only.

public static readonly string True

Represents JavaScript's boolean value true as a string. This field is read-only.

public static readonly string Undefined

Represents JavaScript's undefined as a string. This field is read-only.

public static Func<JsonSerializerSettings> DefaultSettings { get; set; }

Gets or sets a function that creates default JsonSerializerSettings. Default settings are automatically used by serialization methods on JsonConvert, and ToObject<T> and FromObject on JToken. To serialize without using any default settings create a JsonSerializer with Create.

public static T DeserializeAnonymousType<T>(string value, T anonymousTypeObject)

Deserializes the JSON to the given anonymous type.

public static T DeserializeAnonymousType<T>(string value, T anonymousTypeObject, JsonSerializerSettings settings)

Deserializes the JSON to the given anonymous type using JsonSerializerSettings.

public static object DeserializeObject(string value)

Deserializes the JSON to a .NET object.

public static object DeserializeObject(string value, JsonSerializerSettings settings)

Deserializes the JSON to a .NET object using JsonSerializerSettings.

public static object DeserializeObject(string value, Type type)

Deserializes the JSON to the specified .NET type.

public static T DeserializeObject<T>(string value)

Deserializes the JSON to the specified .NET type.

public static T DeserializeObject<T>(string value, JsonConverter[] converters)

Deserializes the JSON to the specified .NET type using a collection of JsonConverter.

public static T DeserializeObject<T>(string value, JsonSerializerSettings settings)

Deserializes the JSON to the specified .NET type using JsonSerializerSettings.

public static object DeserializeObject(string value, Type type, JsonConverter[] converters)

Deserializes the JSON to the specified .NET type using a collection of JsonConverter.

public static object DeserializeObject(string value, Type type, JsonSerializerSettings settings)

Deserializes the JSON to the specified .NET type using JsonSerializerSettings.

public static XmlDocument DeserializeXmlNode(string value)

Deserializes the XmlNode from a JSON string.

public static XmlDocument DeserializeXmlNode(string value, string deserializeRootElementName)

Deserializes the XmlNode from a JSON string nested in a root element specified by deserializeRootElementName.

public static XmlDocument DeserializeXmlNode(string value, string deserializeRootElementName, bool writeArrayAttribute)

Deserializes the XmlNode from a JSON string nested in a root element specified by deserializeRootElementName and writes a Json.NET array attribute for collections.

public static XDocument DeserializeXNode(string value)

Deserializes the XNode from a JSON string.

public static XDocument DeserializeXNode(string value, string deserializeRootElementName)

Deserializes the XNode from a JSON string nested in a root element specified by deserializeRootElementName.

public static XDocument DeserializeXNode(string value, string deserializeRootElementName, bool writeArrayAttribute)

Deserializes the XNode from a JSON string nested in a root element specified by deserializeRootElementName and writes a Json.NET array attribute for collections.

public static void PopulateObject(string value, object target)

Populates the object with values from the JSON string.

public static void PopulateObject(string value, object target, JsonSerializerSettings settings)

Populates the object with values from the JSON string using JsonSerializerSettings.

public static string SerializeObject(object value)

Serializes the specified object to a JSON string.

public static string SerializeObject(object value, Formatting formatting)

Serializes the specified object to a JSON string using formatting.

public static string SerializeObject(object value, JsonConverter[] converters)

Serializes the specified object to a JSON string using a collection of JsonConverter.

public static string SerializeObject(object value, Formatting formatting, JsonConverter[] converters)

Serializes the specified object to a JSON string using formatting and a collection of JsonConverter.

public static string SerializeObject(object value, JsonSerializerSettings settings)

Serializes the specified object to a JSON string using JsonSerializerSettings.

public static string SerializeObject(object value, Type type, JsonSerializerSettings settings)

Serializes the specified object to a JSON string using a type, formatting and JsonSerializerSettings.

public static string SerializeObject(object value, Formatting formatting, JsonSerializerSettings settings)

Serializes the specified object to a JSON string using formatting and JsonSerializerSettings.

public static string SerializeObject(object value, Type type, Formatting formatting, JsonSerializerSettings settings)

Serializes the specified object to a JSON string using a type, formatting and JsonSerializerSettings.

public static string SerializeXmlNode(XmlNode node)

Serializes the XmlNode to a JSON string.

public static string SerializeXmlNode(XmlNode node, Formatting formatting)

Serializes the XmlNode to a JSON string using formatting.

public static string SerializeXmlNode(XmlNode node, Formatting formatting, bool omitRootObject)

Serializes the XmlNode to a JSON string using formatting and omits the root object if omitRootObject is true.

public static string SerializeXNode(XObject node)

Serializes the XNode to a JSON string.

public static string SerializeXNode(XObject node, Formatting formatting)

Serializes the XNode to a JSON string using formatting.

public static string SerializeXNode(XObject node, Formatting formatting, bool omitRootObject)

Serializes the XNode to a JSON string using formatting and omits the root object if omitRootObject is true.

public static string ToString(DateTime value)

Converts the DateTime to its JSON string representation.

public static string ToString(DateTime value, DateFormatHandling format, DateTimeZoneHandling timeZoneHandling)

Converts the DateTime to its JSON string representation using the DateFormatHandling specified.

public static string ToString(DateTimeOffset value)

Converts the DateTimeOffset to its JSON string representation.

public static string ToString(DateTimeOffset value, DateFormatHandling format)

Converts the DateTimeOffset to its JSON string representation using the DateFormatHandling specified.

public static string ToString(bool value)

Converts the Boolean to its JSON string representation.

public static string ToString(char value)

Converts the Char to its JSON string representation.

public static string ToString(Enum value)

Converts the Enum to its JSON string representation.

public static string ToString(int value)

Converts the Int32 to its JSON string representation.

public static string ToString(short value)

Converts the Int16 to its JSON string representation.

public static string ToString(ushort value)

Converts the UInt16 to its JSON string representation.

public static string ToString(uint value)

Converts the UInt32 to its JSON string representation.

public static string ToString(long value)

Converts the Int64 to its JSON string representation.

public static string ToString(ulong value)

Converts the UInt64 to its JSON string representation.

public static string ToString(float value)

Converts the Single to its JSON string representation.

public static string ToString(double value)

Converts the Double to its JSON string representation.

public static string ToString(byte value)

Converts the Byte to its JSON string representation.

public static string ToString(sbyte value)

Converts the SByte to its JSON string representation.

public static string ToString(decimal value)

Converts the Decimal to its JSON string representation.

public static string ToString(Guid value)

Converts the Guid to its JSON string representation.

public static string ToString(TimeSpan value)

Converts the TimeSpan to its JSON string representation.

public static string ToString(Uri value)

Converts the Uri to its JSON string representation.

public static string ToString(string value)

Converts the String to its JSON string representation.

public static string ToString(string value, char delimiter)

Converts the String to its JSON string representation.

public static string ToString(string value, char delimiter, StringEscapeHandling stringEscapeHandling)

Converts the String to its JSON string representation.

public static string ToString(object value)

Converts the Object to its JSON string representation.