Class JsonConvert
Encodes and decodes scalar values to JSON compatible strings.
public static class JsonConvert
- Inheritance
-
JsonConvert
- Inherited Members
Methods
ToBoolean(string)
Converts a string to a Boolean.
public static bool ToBoolean(string value)
Parameters
value
stringThe value.
Returns
- bool
A Boolean.
ToDateTime(string)
Converts a string to a DateTime.
public static DateTime ToDateTime(string value)
Parameters
value
stringThe value.
Returns
- DateTime
A DateTime.
ToDateTimeOffset(string)
Converts a string to a DateTimeOffset.
public static DateTimeOffset ToDateTimeOffset(string value)
Parameters
value
stringThe value.
Returns
- DateTimeOffset
A DateTimeOffset.
ToDecimal(string)
Converts a string to a Decimal.
public static decimal ToDecimal(string value)
Parameters
value
stringThe value.
Returns
- decimal
A Decimal.
ToDecimal128(string)
Converts a string to a Decimal128.
public static Decimal128 ToDecimal128(string value)
Parameters
value
stringThe value.
Returns
ToDouble(string)
Converts a string to a Double.
public static double ToDouble(string value)
Parameters
value
stringThe value.
Returns
- double
A Double.
ToInt16(string)
Converts a string to an Int16.
public static short ToInt16(string value)
Parameters
value
stringThe value.
Returns
- short
An Int16.
ToInt32(string)
Converts a string to an Int32.
public static int ToInt32(string value)
Parameters
value
stringThe value.
Returns
- int
An Int32.
ToInt64(string)
Converts a string to an Int64.
public static long ToInt64(string value)
Parameters
value
stringThe value.
Returns
- long
An Int64.
ToSingle(string)
Converts a string to a Single.
public static float ToSingle(string value)
Parameters
value
stringThe value.
Returns
- float
A Single.
ToString(Decimal128)
Converts a Decimal128 to a string.
public static string ToString(Decimal128 value)
Parameters
value
Decimal128The value.
Returns
- string
A string.
ToString(bool)
Converts a Boolean to a string.
public static string ToString(bool value)
Parameters
value
boolThe value.
Returns
- string
A string.
ToString(DateTime)
Converts a DateTime to a string.
public static string ToString(DateTime value)
Parameters
value
DateTimeThe value.
Returns
- string
A string.
ToString(DateTimeOffset)
Converts a DateTimeOffset to a string.
public static string ToString(DateTimeOffset value)
Parameters
value
DateTimeOffsetThe value.
Returns
- string
A string.
ToString(decimal)
Converts a Decimal to a string.
public static string ToString(decimal value)
Parameters
value
decimalThe value.
Returns
- string
A string.
ToString(double)
Converts a Double to a string.
public static string ToString(double value)
Parameters
value
doubleThe value.
Returns
- string
A string.
ToString(short)
Converts an Int16 to a string.
public static string ToString(short value)
Parameters
value
shortThe value.
Returns
- string
A string.
ToString(int)
Converts an Int32 to a string.
public static string ToString(int value)
Parameters
value
intThe value.
Returns
- string
A string.
ToString(long)
Converts an Int64 to a string.
public static string ToString(long value)
Parameters
value
longThe value.
Returns
- string
A string.
ToString(float)
Converts a Single to a string.
public static string ToString(float value)
Parameters
value
floatThe value.
Returns
- string
A string.
ToString(ushort)
Converts a UInt16 to a string.
[CLSCompliant(false)]
public static string ToString(ushort value)
Parameters
value
ushortThe value.
Returns
- string
A string.
ToString(uint)
Converts a UInt32 to a string.
[CLSCompliant(false)]
public static string ToString(uint value)
Parameters
value
uintThe value.
Returns
- string
A string.
ToString(ulong)
Converts a UInt64 to a string.
[CLSCompliant(false)]
public static string ToString(ulong value)
Parameters
value
ulongThe value.
Returns
- string
A string.
ToUInt16(string)
Converts a string to a UInt16.
[CLSCompliant(false)]
public static ushort ToUInt16(string value)
Parameters
value
stringThe value.
Returns
- ushort
A UInt16.
ToUInt32(string)
Converts a string to a UInt32.
[CLSCompliant(false)]
public static uint ToUInt32(string value)
Parameters
value
stringThe value.
Returns
- uint
A UInt32.
ToUInt64(string)
Converts a string to a UInt64.
[CLSCompliant(false)]
public static ulong ToUInt64(string value)
Parameters
value
stringThe value.
Returns
- ulong
A UInt64.