Class JsonConvert
Provides methods for converting between common language runtime types and JSON types.
Inheritance
Inherited Members
Namespace: Bayat.Json
Assembly: Bayat.Json.Runtime.dll
Syntax
public static class JsonConvert
Examples
Fields
| Improve this Doc View SourceFalse
Represents JavaScript's boolean value false as a string. This field is read-only.
Declaration
public static readonly string False
Field Value
Type | Description |
---|---|
System. |
NaN
Represents JavaScript's NaN as a string. This field is read-only.
Declaration
public static readonly string NaN
Field Value
Type | Description |
---|---|
System. |
NegativeInfinity
Represents JavaScript's negative infinity as a string. This field is read-only.
Declaration
public static readonly string NegativeInfinity
Field Value
Type | Description |
---|---|
System. |
Null
Represents JavaScript's null as a string. This field is read-only.
Declaration
public static readonly string Null
Field Value
Type | Description |
---|---|
System. |
PositiveInfinity
Represents JavaScript's positive infinity as a string. This field is read-only.
Declaration
public static readonly string PositiveInfinity
Field Value
Type | Description |
---|---|
System. |
True
Represents JavaScript's boolean value true as a string. This field is read-only.
Declaration
public static readonly string True
Field Value
Type | Description |
---|---|
System. |
Undefined
Represents JavaScript's undefined as a string. This field is read-only.
Declaration
public static readonly string Undefined
Field Value
Type | Description |
---|---|
System. |
Properties
| Improve this Doc View SourceDefaultSettings
Gets or sets a function that creates default Json
Declaration
public static Func<JsonSerializerSettings> DefaultSettings { get; set; }
Property Value
Type | Description |
---|---|
System. |
Methods
| Improve this Doc View SourceDeserializeAnonymousType<T>(String, T)
Deserializes the JSON to the given anonymous type.
Declaration
public static T DeserializeAnonymousType<T>(string value, T anonymousTypeObject)
Parameters
Type | Name | Description |
---|---|---|
System. |
value | The JSON to deserialize. |
T | anonymousTypeObject | The anonymous type object. |
Returns
Type | Description |
---|---|
T | The deserialized anonymous type from the JSON string. |
Type Parameters
Name | Description |
---|---|
T | The anonymous type to deserialize to. This can't be specified traditionally and must be infered from the anonymous type passed as a parameter. |
DeserializeAnonymousType<T>(String, T, JsonSerializerSettings)
Deserializes the JSON to the given anonymous type using Json
Declaration
public static T DeserializeAnonymousType<T>(string value, T anonymousTypeObject, JsonSerializerSettings settings)
Parameters
Type | Name | Description |
---|---|---|
System. |
value | The JSON to deserialize. |
T | anonymousTypeObject | The anonymous type object. |
Json |
settings | The Json |
Returns
Type | Description |
---|---|
T | The deserialized anonymous type from the JSON string. |
Type Parameters
Name | Description |
---|---|
T | The anonymous type to deserialize to. This can't be specified traditionally and must be infered from the anonymous type passed as a parameter. |
DeserializeObject(String)
Deserializes the JSON to a .NET object.
Declaration
public static object DeserializeObject(string value)
Parameters
Type | Name | Description |
---|---|---|
System. |
value | The JSON to deserialize. |
Returns
Type | Description |
---|---|
System. |
The deserialized object from the JSON string. |
DeserializeObject(String, JsonSerializerSettings)
Deserializes the JSON to a .NET object using Json
Declaration
public static object DeserializeObject(string value, JsonSerializerSettings settings)
Parameters
Type | Name | Description |
---|---|---|
System. |
value | The JSON to deserialize. |
Json |
settings | The Json |
Returns
Type | Description |
---|---|
System. |
The deserialized object from the JSON string. |
DeserializeObject(String, Type)
Deserializes the JSON to the specified .NET type.
Declaration
public static object DeserializeObject(string value, Type type)
Parameters
Type | Name | Description |
---|---|---|
System. |
value | The JSON to deserialize. |
System. |
type | The System. |
Returns
Type | Description |
---|---|
System. |
The deserialized object from the JSON string. |
DeserializeObject(String, Type, JsonConverter[])
Deserializes the JSON to the specified .NET type using a collection of Json
Declaration
public static object DeserializeObject(string value, Type type, params JsonConverter[] converters)
Parameters
Type | Name | Description |
---|---|---|
System. |
value | The JSON to deserialize. |
System. |
type | The type of the object to deserialize. |
Json |
converters | Converters to use while deserializing. |
Returns
Type | Description |
---|---|
System. |
The deserialized object from the JSON string. |
DeserializeObject(String, Type, JsonSerializerSettings)
Deserializes the JSON to the specified .NET type using Json
Declaration
public static object DeserializeObject(string value, Type type, JsonSerializerSettings settings)
Parameters
Type | Name | Description |
---|---|---|
System. |
value | The JSON to deserialize. |
System. |
type | The type of the object to deserialize to. |
Json |
settings | The Json |
Returns
Type | Description |
---|---|
System. |
The deserialized object from the JSON string. |
DeserializeObject<T>(String)
Deserializes the JSON to the specified .NET type.
Declaration
public static T DeserializeObject<T>(string value)
Parameters
Type | Name | Description |
---|---|---|
System. |
value | The JSON to deserialize. |
Returns
Type | Description |
---|---|
T | The deserialized object from the JSON string. |
Type Parameters
Name | Description |
---|---|
T | The type of the object to deserialize to. |
DeserializeObject<T>(String, JsonConverter[])
Deserializes the JSON to the specified .NET type using a collection of Json
Declaration
public static T DeserializeObject<T>(string value, params JsonConverter[] converters)
Parameters
Type | Name | Description |
---|---|---|
System. |
value | The JSON to deserialize. |
Json |
converters | Converters to use while deserializing. |
Returns
Type | Description |
---|---|
T | The deserialized object from the JSON string. |
Type Parameters
Name | Description |
---|---|
T | The type of the object to deserialize to. |
DeserializeObject<T>(String, JsonSerializerSettings)
Deserializes the JSON to the specified .NET type using Json
Declaration
public static T DeserializeObject<T>(string value, JsonSerializerSettings settings)
Parameters
Type | Name | Description |
---|---|---|
System. |
value | The object to deserialize. |
Json |
settings | The Json |
Returns
Type | Description |
---|---|
T | The deserialized object from the JSON string. |
Type Parameters
Name | Description |
---|---|
T | The type of the object to deserialize to. |
DeserializeObjectAsync(String)
Asynchronously deserializes the JSON to the specified .NET type. Deserialization will happen on a new thread.
Declaration
[Obsolete("DeserializeObjectAsync is obsolete. Use the Task.Factory.StartNew method to deserialize JSON asynchronously: Task.Factory.StartNew(() => JsonConvert.DeserializeObject(value))")]
public static Task<object> DeserializeObjectAsync(string value)
Parameters
Type | Name | Description |
---|---|---|
System. |
value | The JSON to deserialize. |
Returns
Type | Description |
---|---|
System. |
A task that represents the asynchronous deserialize operation. The value of the |
DeserializeObjectAsync(String, Type, JsonSerializerSettings)
Asynchronously deserializes the JSON to the specified .NET type using Json
Declaration
[Obsolete("DeserializeObjectAsync is obsolete. Use the Task.Factory.StartNew method to deserialize JSON asynchronously: Task.Factory.StartNew(() => JsonConvert.DeserializeObject(value, type, settings))")]
public static Task<object> DeserializeObjectAsync(string value, Type type, JsonSerializerSettings settings)
Parameters
Type | Name | Description |
---|---|---|
System. |
value | The JSON to deserialize. |
System. |
type | The type of the object to deserialize to. |
Json |
settings | The Json |
Returns
Type | Description |
---|---|
System. |
A task that represents the asynchronous deserialize operation. The value of the |
DeserializeObjectAsync<T>(String)
Asynchronously deserializes the JSON to the specified .NET type. Deserialization will happen on a new thread.
Declaration
[Obsolete("DeserializeObjectAsync is obsolete. Use the Task.Factory.StartNew method to deserialize JSON asynchronously: Task.Factory.StartNew(() => JsonConvert.DeserializeObject<T>(value))")]
public static Task<T> DeserializeObjectAsync<T>(string value)
Parameters
Type | Name | Description |
---|---|---|
System. |
value | The JSON to deserialize. |
Returns
Type | Description |
---|---|
System. |
A task that represents the asynchronous deserialize operation. The value of the |
Type Parameters
Name | Description |
---|---|
T | The type of the object to deserialize to. |
DeserializeObjectAsync<T>(String, JsonSerializerSettings)
Asynchronously deserializes the JSON to the specified .NET type using Json
Declaration
[Obsolete("DeserializeObjectAsync is obsolete. Use the Task.Factory.StartNew method to deserialize JSON asynchronously: Task.Factory.StartNew(() => JsonConvert.DeserializeObject<T>(value, settings))")]
public static Task<T> DeserializeObjectAsync<T>(string value, JsonSerializerSettings settings)
Parameters
Type | Name | Description |
---|---|---|
System. |
value | The JSON to deserialize. |
Json |
settings | The Json |
Returns
Type | Description |
---|---|
System. |
A task that represents the asynchronous deserialize operation. The value of the |
Type Parameters
Name | Description |
---|---|
T | The type of the object to deserialize to. |
DeserializeXmlNode(String)
Deserializes the XmlNode from a JSON string.
Declaration
public static XmlDocument DeserializeXmlNode(string value)
Parameters
Type | Name | Description |
---|---|---|
System. |
value | The JSON string. |
Returns
Type | Description |
---|---|
System. |
The deserialized XmlNode |
DeserializeXmlNode(String, String)
Deserializes the XmlNode from a JSON string nested in a root elment specified by deserializeRootElementName
.
Declaration
public static XmlDocument DeserializeXmlNode(string value, string deserializeRootElementName)
Parameters
Type | Name | Description |
---|---|---|
System. |
value | The JSON string. |
System. |
deserializeRootElementName | The name of the root element to append when deserializing. |
Returns
Type | Description |
---|---|
System. |
The deserialized XmlNode |
DeserializeXmlNode(String, String, Boolean)
Deserializes the XmlNode from a JSON string nested in a root elment specified by deserializeRootElementName
and writes a .NET array attribute for collections.
Declaration
public static XmlDocument DeserializeXmlNode(string value, string deserializeRootElementName, bool writeArrayAttribute)
Parameters
Type | Name | Description |
---|---|---|
System. |
value | The JSON string. |
System. |
deserializeRootElementName | The name of the root element to append when deserializing. |
System. |
writeArrayAttribute | A flag to indicate whether to write the Json.NET array attribute. This attribute helps preserve arrays when converting the written XML back to JSON. |
Returns
Type | Description |
---|---|
System. |
The deserialized XmlNode |
DeserializeXNode(String)
Deserializes the System.
Declaration
public static XDocument DeserializeXNode(string value)
Parameters
Type | Name | Description |
---|---|---|
System. |
value | The JSON string. |
Returns
Type | Description |
---|---|
System. |
The deserialized XNode |
DeserializeXNode(String, String)
Deserializes the System.deserializeRootElementName
.
Declaration
public static XDocument DeserializeXNode(string value, string deserializeRootElementName)
Parameters
Type | Name | Description |
---|---|---|
System. |
value | The JSON string. |
System. |
deserializeRootElementName | The name of the root element to append when deserializing. |
Returns
Type | Description |
---|---|
System. |
The deserialized XNode |
DeserializeXNode(String, String, Boolean)
Deserializes the System.deserializeRootElementName
and writes a .NET array attribute for collections.
Declaration
public static XDocument DeserializeXNode(string value, string deserializeRootElementName, bool writeArrayAttribute)
Parameters
Type | Name | Description |
---|---|---|
System. |
value | The JSON string. |
System. |
deserializeRootElementName | The name of the root element to append when deserializing. |
System. |
writeArrayAttribute | A flag to indicate whether to write the Json.NET array attribute. This attribute helps preserve arrays when converting the written XML back to JSON. |
Returns
Type | Description |
---|---|
System. |
The deserialized XNode |
GetDefaultSettings()
Declaration
public static JsonSerializerSettings GetDefaultSettings()
Returns
Type | Description |
---|---|
Json |
PopulateObject(String, Object)
Populates the object with values from the JSON string.
Declaration
public static void PopulateObject(string value, object target)
Parameters
Type | Name | Description |
---|---|---|
System. |
value | The JSON to populate values from. |
System. |
target | The target object to populate values onto. |
PopulateObject(String, Object, JsonSerializerSettings)
Populates the object with values from the JSON string using Json
Declaration
public static void PopulateObject(string value, object target, JsonSerializerSettings settings)
Parameters
Type | Name | Description |
---|---|---|
System. |
value | The JSON to populate values from. |
System. |
target | The target object to populate values onto. |
Json |
settings | The Json |
PopulateObjectAsync(String, Object, JsonSerializerSettings)
Asynchronously populates the object with values from the JSON string using Json
Declaration
[Obsolete("PopulateObjectAsync is obsolete. Use the Task.Factory.StartNew method to populate an object with JSON values asynchronously: Task.Factory.StartNew(() => JsonConvert.PopulateObject(value, target, settings))")]
public static Task PopulateObjectAsync(string value, object target, JsonSerializerSettings settings)
Parameters
Type | Name | Description |
---|---|---|
System. |
value | The JSON to populate values from. |
System. |
target | The target object to populate values onto. |
Json |
settings | The Json |
Returns
Type | Description |
---|---|
System. |
A task that represents the asynchronous populate operation. |
SerializeObject(Object)
Serializes the specified object to a JSON string.
Declaration
public static string SerializeObject(object value)
Parameters
Type | Name | Description |
---|---|---|
System. |
value | The object to serialize. |
Returns
Type | Description |
---|---|
System. |
A JSON string representation of the object. |
SerializeObject(Object, Formatting)
Serializes the specified object to a JSON string using formatting.
Declaration
public static string SerializeObject(object value, Formatting formatting)
Parameters
Type | Name | Description |
---|---|---|
System. |
value | The object to serialize. |
Formatting | formatting | Indicates how the output is formatted. |
Returns
Type | Description |
---|---|
System. |
A JSON string representation of the object. |
SerializeObject(Object, Formatting, JsonConverter[])
Serializes the specified object to a JSON string using formatting and a collection of Json
Declaration
public static string SerializeObject(object value, Formatting formatting, params JsonConverter[] converters)
Parameters
Type | Name | Description |
---|---|---|
System. |
value | The object to serialize. |
Formatting | formatting | Indicates how the output is formatted. |
Json |
converters | A collection converters used while serializing. |
Returns
Type | Description |
---|---|
System. |
A JSON string representation of the object. |
SerializeObject(Object, Formatting, JsonSerializerSettings)
Serializes the specified object to a JSON string using formatting and Json
Declaration
public static string SerializeObject(object value, Formatting formatting, JsonSerializerSettings settings)
Parameters
Type | Name | Description |
---|---|---|
System. |
value | The object to serialize. |
Formatting | formatting | Indicates how the output is formatted. |
Json |
settings | The Json |
Returns
Type | Description |
---|---|
System. |
A JSON string representation of the object. |
SerializeObject(Object, JsonConverter[])
Serializes the specified object to a JSON string using a collection of Json
Declaration
public static string SerializeObject(object value, params JsonConverter[] converters)
Parameters
Type | Name | Description |
---|---|---|
System. |
value | The object to serialize. |
Json |
converters | A collection converters used while serializing. |
Returns
Type | Description |
---|---|
System. |
A JSON string representation of the object. |
SerializeObject(Object, JsonSerializerSettings)
Serializes the specified object to a JSON string using Json
Declaration
public static string SerializeObject(object value, JsonSerializerSettings settings)
Parameters
Type | Name | Description |
---|---|---|
System. |
value | The object to serialize. |
Json |
settings | The Json |
Returns
Type | Description |
---|---|
System. |
A JSON string representation of the object. |
SerializeObject(Object, Type, Formatting, JsonSerializerSettings)
Serializes the specified object to a JSON string using a type, formatting and Json
Declaration
public static string SerializeObject(object value, Type type, Formatting formatting, JsonSerializerSettings settings)
Parameters
Type | Name | Description |
---|---|---|
System. |
value | The object to serialize. |
System. |
type | The type of the value being serialized.
This parameter is used when Type |
Formatting | formatting | Indicates how the output is formatted. |
Json |
settings | The Json |
Returns
Type | Description |
---|---|
System. |
A JSON string representation of the object. |
SerializeObject(Object, Type, JsonSerializerSettings)
Serializes the specified object to a JSON string using a type, formatting and Json
Declaration
public static string SerializeObject(object value, Type type, JsonSerializerSettings settings)
Parameters
Type | Name | Description |
---|---|---|
System. |
value | The object to serialize. |
System. |
type | The type of the value being serialized.
This parameter is used when Type |
Json |
settings | The Json |
Returns
Type | Description |
---|---|
System. |
A JSON string representation of the object. |
SerializeObjectAsync(Object)
Asynchronously serializes the specified object to a JSON string. Serialization will happen on a new thread.
Declaration
[Obsolete("SerializeObjectAsync is obsolete. Use the Task.Factory.StartNew method to serialize JSON asynchronously: Task.Factory.StartNew(() => JsonConvert.SerializeObject(value))")]
public static Task<string> SerializeObjectAsync(object value)
Parameters
Type | Name | Description |
---|---|---|
System. |
value | The object to serialize. |
Returns
Type | Description |
---|---|
System. |
A task that represents the asynchronous serialize operation. The value of the |
SerializeObjectAsync(Object, Formatting)
Asynchronously serializes the specified object to a JSON string using formatting. Serialization will happen on a new thread.
Declaration
[Obsolete("SerializeObjectAsync is obsolete. Use the Task.Factory.StartNew method to serialize JSON asynchronously: Task.Factory.StartNew(() => JsonConvert.SerializeObject(value, formatting))")]
public static Task<string> SerializeObjectAsync(object value, Formatting formatting)
Parameters
Type | Name | Description |
---|---|---|
System. |
value | The object to serialize. |
Formatting | formatting | Indicates how the output is formatted. |
Returns
Type | Description |
---|---|
System. |
A task that represents the asynchronous serialize operation. The value of the |
SerializeObjectAsync(Object, Formatting, JsonSerializerSettings)
Asynchronously serializes the specified object to a JSON string using formatting and a collection of Json
Declaration
[Obsolete("SerializeObjectAsync is obsolete. Use the Task.Factory.StartNew method to serialize JSON asynchronously: Task.Factory.StartNew(() => JsonConvert.SerializeObject(value, formatting, settings))")]
public static Task<string> SerializeObjectAsync(object value, Formatting formatting, JsonSerializerSettings settings)
Parameters
Type | Name | Description |
---|---|---|
System. |
value | The object to serialize. |
Formatting | formatting | Indicates how the output is formatted. |
Json |
settings | The Json |
Returns
Type | Description |
---|---|
System. |
A task that represents the asynchronous serialize operation. The value of the |
SerializeXmlNode(XmlNode)
Serializes the XML node to a JSON string.
Declaration
public static string SerializeXmlNode(XmlNode node)
Parameters
Type | Name | Description |
---|---|---|
System. |
node | The node to serialize. |
Returns
Type | Description |
---|---|
System. |
A JSON string of the XmlNode. |
SerializeXmlNode(XmlNode, Formatting)
Serializes the XML node to a JSON string using formatting.
Declaration
public static string SerializeXmlNode(XmlNode node, Formatting formatting)
Parameters
Type | Name | Description |
---|---|---|
System. |
node | The node to serialize. |
Formatting | formatting | Indicates how the output is formatted. |
Returns
Type | Description |
---|---|
System. |
A JSON string of the XmlNode. |
SerializeXmlNode(XmlNode, Formatting, Boolean)
Serializes the XML node to a JSON string using formatting and omits the root object if omitRootObject
is true
.
Declaration
public static string SerializeXmlNode(XmlNode node, Formatting formatting, bool omitRootObject)
Parameters
Type | Name | Description |
---|---|---|
System. |
node | The node to serialize. |
Formatting | formatting | Indicates how the output is formatted. |
System. |
omitRootObject | Omits writing the root object. |
Returns
Type | Description |
---|---|
System. |
A JSON string of the XmlNode. |
SerializeXNode(XObject)
Serializes the System.
Declaration
public static string SerializeXNode(XObject node)
Parameters
Type | Name | Description |
---|---|---|
System. |
node | The node to convert to JSON. |
Returns
Type | Description |
---|---|
System. |
A JSON string of the XNode. |
SerializeXNode(XObject, Formatting)
Serializes the System.
Declaration
public static string SerializeXNode(XObject node, Formatting formatting)
Parameters
Type | Name | Description |
---|---|---|
System. |
node | The node to convert to JSON. |
Formatting | formatting | Indicates how the output is formatted. |
Returns
Type | Description |
---|---|
System. |
A JSON string of the XNode. |
SerializeXNode(XObject, Formatting, Boolean)
Serializes the System.omitRootObject
is true
.
Declaration
public static string SerializeXNode(XObject node, Formatting formatting, bool omitRootObject)
Parameters
Type | Name | Description |
---|---|---|
System. |
node | The node to serialize. |
Formatting | formatting | Indicates how the output is formatted. |
System. |
omitRootObject | Omits writing the root object. |
Returns
Type | Description |
---|---|
System. |
A JSON string of the XNode. |
ToString(Boolean)
Converts the System.
Declaration
public static string ToString(bool value)
Parameters
Type | Name | Description |
---|---|---|
System. |
value | The value to convert. |
Returns
Type | Description |
---|---|
System. |
A JSON string representation of the System. |
ToString(Byte)
Converts the System.
Declaration
public static string ToString(byte value)
Parameters
Type | Name | Description |
---|---|---|
System. |
value | The value to convert. |
Returns
Type | Description |
---|---|
System. |
A JSON string representation of the System. |
ToString(Char)
Converts the System.
Declaration
public static string ToString(char value)
Parameters
Type | Name | Description |
---|---|---|
System. |
value | The value to convert. |
Returns
Type | Description |
---|---|
System. |
A JSON string representation of the System. |
ToString(DateTime)
Converts the System.
Declaration
public static string ToString(DateTime value)
Parameters
Type | Name | Description |
---|---|---|
System. |
value | The value to convert. |
Returns
Type | Description |
---|---|
System. |
A JSON string representation of the System. |
ToString(DateTime, DateFormatHandling, DateTimeZoneHandling)
Converts the System.
Declaration
public static string ToString(DateTime value, DateFormatHandling format, DateTimeZoneHandling timeZoneHandling)
Parameters
Type | Name | Description |
---|---|---|
System. |
value | The value to convert. |
Date |
format | The format the date will be converted to. |
Date |
timeZoneHandling | The time zone handling when the date is converted to a string. |
Returns
Type | Description |
---|---|
System. |
A JSON string representation of the System. |
ToString(DateTimeOffset)
Converts the System.
Declaration
public static string ToString(DateTimeOffset value)
Parameters
Type | Name | Description |
---|---|---|
System. |
value | The value to convert. |
Returns
Type | Description |
---|---|
System. |
A JSON string representation of the System. |
ToString(DateTimeOffset, DateFormatHandling)
Converts the System.
Declaration
public static string ToString(DateTimeOffset value, DateFormatHandling format)
Parameters
Type | Name | Description |
---|---|---|
System. |
value | The value to convert. |
Date |
format | The format the date will be converted to. |
Returns
Type | Description |
---|---|
System. |
A JSON string representation of the System. |
ToString(Decimal)
Converts the System.
Declaration
public static string ToString(decimal value)
Parameters
Type | Name | Description |
---|---|---|
System. |
value | The value to convert. |
Returns
Type | Description |
---|---|
System. |
A JSON string representation of the System. |
ToString(Double)
Converts the System.
Declaration
public static string ToString(double value)
Parameters
Type | Name | Description |
---|---|---|
System. |
value | The value to convert. |
Returns
Type | Description |
---|---|
System. |
A JSON string representation of the System. |
ToString(Double, FloatFormatHandling, Char, Boolean)
Declaration
public static string ToString(double value, FloatFormatHandling floatFormatHandling, char quoteChar, bool nullable)
Parameters
Type | Name | Description |
---|---|---|
System. |
value | |
Float |
floatFormatHandling | |
System. |
quoteChar | |
System. |
nullable |
Returns
Type | Description |
---|---|
System. |
ToString(Enum)
Converts the System.
Declaration
public static string ToString(Enum value)
Parameters
Type | Name | Description |
---|---|---|
System. |
value | The value to convert. |
Returns
Type | Description |
---|---|
System. |
A JSON string representation of the System. |
ToString(Guid)
Converts the System.
Declaration
public static string ToString(Guid value)
Parameters
Type | Name | Description |
---|---|---|
System. |
value | The value to convert. |
Returns
Type | Description |
---|---|
System. |
A JSON string representation of the System. |
ToString(Guid, Char)
Declaration
public static string ToString(Guid value, char quoteChar)
Parameters
Type | Name | Description |
---|---|---|
System. |
value | |
System. |
quoteChar |
Returns
Type | Description |
---|---|
System. |
ToString(Int16)
Converts the System.
Declaration
public static string ToString(short value)
Parameters
Type | Name | Description |
---|---|---|
System. |
value | The value to convert. |
Returns
Type | Description |
---|---|
System. |
A JSON string representation of the System. |
ToString(Int32)
Converts the System.
Declaration
public static string ToString(int value)
Parameters
Type | Name | Description |
---|---|---|
System. |
value | The value to convert. |
Returns
Type | Description |
---|---|
System. |
A JSON string representation of the System. |
ToString(Int64)
Converts the System.
Declaration
public static string ToString(long value)
Parameters
Type | Name | Description |
---|---|---|
System. |
value | The value to convert. |
Returns
Type | Description |
---|---|
System. |
A JSON string representation of the System. |
ToString(Object)
Converts the System.
Declaration
public static string ToString(object value)
Parameters
Type | Name | Description |
---|---|---|
System. |
value | The value to convert. |
Returns
Type | Description |
---|---|
System. |
A JSON string representation of the System. |
ToString(SByte)
Converts the System.
Declaration
public static string ToString(sbyte value)
Parameters
Type | Name | Description |
---|---|---|
System. |
value | The value to convert. |
Returns
Type | Description |
---|---|
System. |
A JSON string representation of the System. |
ToString(Single)
Converts the System.
Declaration
public static string ToString(float value)
Parameters
Type | Name | Description |
---|---|---|
System. |
value | The value to convert. |
Returns
Type | Description |
---|---|
System. |
A JSON string representation of the System. |
ToString(Single, FloatFormatHandling, Char, Boolean)
Declaration
public static string ToString(float value, FloatFormatHandling floatFormatHandling, char quoteChar, bool nullable)
Parameters
Type | Name | Description |
---|---|---|
System. |
value | |
Float |
floatFormatHandling | |
System. |
quoteChar | |
System. |
nullable |
Returns
Type | Description |
---|---|
System. |
ToString(String)
Converts the System.
Declaration
public static string ToString(string value)
Parameters
Type | Name | Description |
---|---|---|
System. |
value | The value to convert. |
Returns
Type | Description |
---|---|
System. |
A JSON string representation of the System. |
ToString(String, Char)
Converts the System.
Declaration
public static string ToString(string value, char delimiter)
Parameters
Type | Name | Description |
---|---|---|
System. |
value | The value to convert. |
System. |
delimiter | The string delimiter character. |
Returns
Type | Description |
---|---|
System. |
A JSON string representation of the System. |
ToString(String, Char, StringEscapeHandling)
Converts the System.
Declaration
public static string ToString(string value, char delimiter, StringEscapeHandling stringEscapeHandling)
Parameters
Type | Name | Description |
---|---|---|
System. |
value | The value to convert. |
System. |
delimiter | The string delimiter character. |
String |
stringEscapeHandling | The string escape handling. |
Returns
Type | Description |
---|---|
System. |
A JSON string representation of the System. |
ToString(TimeSpan)
Converts the System.
Declaration
public static string ToString(TimeSpan value)
Parameters
Type | Name | Description |
---|---|---|
System. |
value | The value to convert. |
Returns
Type | Description |
---|---|
System. |
A JSON string representation of the System. |
ToString(TimeSpan, Char)
Declaration
public static string ToString(TimeSpan value, char quoteChar)
Parameters
Type | Name | Description |
---|---|---|
System. |
value | |
System. |
quoteChar |
Returns
Type | Description |
---|---|
System. |
ToString(UInt16)
Converts the System.
Declaration
public static string ToString(ushort value)
Parameters
Type | Name | Description |
---|---|---|
System. |
value | The value to convert. |
Returns
Type | Description |
---|---|
System. |
A JSON string representation of the System. |
ToString(UInt32)
Converts the System.
Declaration
public static string ToString(uint value)
Parameters
Type | Name | Description |
---|---|---|
System. |
value | The value to convert. |
Returns
Type | Description |
---|---|
System. |
A JSON string representation of the System. |
ToString(UInt64)
Converts the System.
Declaration
public static string ToString(ulong value)
Parameters
Type | Name | Description |
---|---|---|
System. |
value | The value to convert. |
Returns
Type | Description |
---|---|
System. |
A JSON string representation of the System. |
ToString(Uri)
Converts the System.
Declaration
public static string ToString(Uri value)
Parameters
Type | Name | Description |
---|---|---|
System. |
value | The value to convert. |
Returns
Type | Description |
---|---|
System. |
A JSON string representation of the System. |
ToString(Uri, Char)
Declaration
public static string ToString(Uri value, char quoteChar)
Parameters
Type | Name | Description |
---|---|---|
System. |
value | |
System. |
quoteChar |
Returns
Type | Description |
---|---|
System. |