<PackageReference Include="newtonsoft.json" Version="3.5.8" />

JsonConvert

public static class JsonConvert
Provides methods for converting between common language runtime 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 T DeserializeAnonymousType<T>(string value, T anonymousTypeObject)

Deserializes the specified JSON to the given anonymous type.

public static object DeserializeObject(string value)

Deserializes the specified object to a Json object.

public static object DeserializeObject(string value, Type type)

Deserializes the specified object to a Json object.

public static T DeserializeObject<T>(string value)

Deserializes the specified object to a Json object.

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

Deserializes the JSON string to the specified type.

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

Deserializes the JSON string to the specified type.

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

Deserializes the JSON string to the specified type.

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

Deserializes the JSON string to the specified type.

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 elment.

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.

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.

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 a collection of JsonConverter.

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

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

public static string SerializeXmlNode(XmlNode node)

Serializes the XML node to a JSON string.

public static string SerializeXmlNode(XmlNode node, Formatting formatting)

Serializes the XML node to a JSON string.

public static string ToString(DateTime value)

Converts the DateTime to its JSON string representation.

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(string value)

Converts the String to its JSON string representation.

public static string ToString(string value, char delimter)

Converts the String to its JSON string representation.

public static string ToString(object value)

Converts the Object to its JSON string representation.