Show / Hide Table of Contents

    Class JsonConverter

    This utility class is designed to make JSON related conversions easier to work with.

    Inheritance
    System.Object
    JsonConverter
    Namespace: Cuemon.Runtime.Serialization
    Assembly: Cuemon.Runtime.dll
    Syntax
    public static class JsonConverter

    Fields

    | Improve this Doc

    NullValue

    Represents the null literal as defined in RFC 4627.

    Declaration
    public static readonly string NullValue
    Field Value
    Type Description
    System.String

    Properties

    | Improve this Doc

    JsonAsciiConverter

    The function delegate that will handle JSON ASCII conversions.

    Declaration
    public static Func<int, string> JsonAsciiConverter { get; set; }
    Property Value
    Type Description
    System.Func<System.Int32, System.String>
    | Improve this Doc

    JsonUnicodeConverter

    The function delegate that will handle JSON Unicode conversions.

    Declaration
    public static Func<int, string> JsonUnicodeConverter { get; set; }
    Property Value
    Type Description
    System.Func<System.Int32, System.String>

    Methods

    | Improve this Doc

    Escape(String)

    JSON escapes the specified value using the two function delegates; JsonAsciiConverter and JsonUnicodeConverter.

    Declaration
    public static string Escape(string value)
    Parameters
    Type Name Description
    System.String value

    The System.String to escape.

    Returns
    Type Description
    System.String

    A JSON escaped System.String that is equivalent to value.

    | Improve this Doc

    ToString(Boolean)

    Returns the boolean value of a JSON object as defined in RFC 4627.

    Declaration
    public static string ToString(bool value)
    Parameters
    Type Name Description
    System.Boolean value

    The value of the JSON object.

    Returns
    Type Description
    System.String

    A System.String representation of value.

    | Improve this Doc

    ToString(Byte)

    Returns the numeric value of a JSON object as defined in RFC 4627.

    Declaration
    public static string ToString(byte value)
    Parameters
    Type Name Description
    System.Byte value

    The value of the JSON object.

    Returns
    Type Description
    System.String

    A System.String representation of value.

    | Improve this Doc

    ToString(Byte[])

    Returns the string value of a JSON object as defined in RFC 4627.

    Declaration
    public static string ToString(byte[] value)
    Parameters
    Type Name Description
    System.Byte[] value

    The value of the JSON object.

    Returns
    Type Description
    System.String

    A System.String representation of value.

    Remarks

    value is converted to a Base64 encoded string.

    | Improve this Doc

    ToString(Char)

    Returns the string value of a JSON object as defined in RFC 4627.

    Declaration
    public static string ToString(char value)
    Parameters
    Type Name Description
    System.Char value

    The value of the JSON object.

    Returns
    Type Description
    System.String

    A System.String representation of value.

    | Improve this Doc

    ToString(DateTime)

    Returns the string value of a JSON object as defined in RFC 4627.

    Declaration
    public static string ToString(DateTime value)
    Parameters
    Type Name Description
    System.DateTime value

    The value of the JSON object.

    Returns
    Type Description
    System.String

    A System.String representation of value.

    | Improve this Doc

    ToString(Decimal)

    Returns the numeric value of a JSON object as defined in RFC 4627.

    Declaration
    public static string ToString(decimal value)
    Parameters
    Type Name Description
    System.Decimal value

    The value of the JSON object.

    Returns
    Type Description
    System.String

    A System.String representation of value.

    | Improve this Doc

    ToString(Double)

    Returns the numeric value of a JSON object as defined in RFC 4627.

    Declaration
    public static string ToString(double value)
    Parameters
    Type Name Description
    System.Double value

    The value of the JSON object.

    Returns
    Type Description
    System.String

    A System.String representation of value.

    | Improve this Doc

    ToString(Guid)

    Returns the string value of a JSON object as defined in RFC 4627.

    Declaration
    public static string ToString(Guid value)
    Parameters
    Type Name Description
    System.Guid value

    The value of the JSON object.

    Returns
    Type Description
    System.String

    A System.String representation of value.

    | Improve this Doc

    ToString(Int16)

    Returns the numeric value of a JSON object as defined in RFC 4627.

    Declaration
    public static string ToString(short value)
    Parameters
    Type Name Description
    System.Int16 value

    The value of the JSON object.

    Returns
    Type Description
    System.String

    A System.String representation of value.

    | Improve this Doc

    ToString(Int32)

    Returns the numeric value of a JSON object as defined in RFC 4627.

    Declaration
    public static string ToString(int value)
    Parameters
    Type Name Description
    System.Int32 value

    The value of the JSON object.

    Returns
    Type Description
    System.String

    A System.String representation of value.

    | Improve this Doc

    ToString(Int64)

    Returns the numeric value of a JSON object as defined in RFC 4627.

    Declaration
    public static string ToString(long value)
    Parameters
    Type Name Description
    System.Int64 value

    The value of the JSON object.

    Returns
    Type Description
    System.String

    A System.String representation of value.

    | Improve this Doc

    ToString(Object)

    Returns the value of a JSON object.

    Declaration
    public static string ToString(object value)
    Parameters
    Type Name Description
    System.Object value

    The value of the JSON object.

    Returns
    Type Description
    System.String

    A System.String representation of value.

    Remarks

    value is checked and written accordingly by the System.IConvertible interface.

    | Improve this Doc

    ToString(Object, Type)

    Returns the value of a JSON object.

    Declaration
    public static string ToString(object value, Type valueType)
    Parameters
    Type Name Description
    System.Object value

    The value of the JSON object.

    System.Type valueType

    The type of the value.

    Returns
    Type Description
    System.String

    A System.String representation of value.

    Remarks

    value is checked and written accordingly by the System.IConvertible interface.

    | Improve this Doc

    ToString(SByte)

    Returns the numeric value of a JSON object as defined in RFC 4627.

    Declaration
    public static string ToString(sbyte value)
    Parameters
    Type Name Description
    System.SByte value

    The value of the JSON object.

    Returns
    Type Description
    System.String

    A System.String representation of value.

    | Improve this Doc

    ToString(Single)

    Returns the numeric value of a JSON object as defined in RFC 4627.

    Declaration
    public static string ToString(float value)
    Parameters
    Type Name Description
    System.Single value

    The value of the JSON object.

    Returns
    Type Description
    System.String

    A System.String representation of value.

    | Improve this Doc

    ToString(String)

    Returns the string value of a JSON object as defined in RFC 4627.

    Declaration
    public static string ToString(string value)
    Parameters
    Type Name Description
    System.String value

    The value of the JSON object.

    Returns
    Type Description
    System.String

    A System.String representation of value.

    | Improve this Doc

    ToString(UInt16)

    Returns the numeric value of a JSON object as defined in RFC 4627.

    Declaration
    public static string ToString(ushort value)
    Parameters
    Type Name Description
    System.UInt16 value

    The value of the JSON object.

    Returns
    Type Description
    System.String

    A System.String representation of value.

    | Improve this Doc

    ToString(UInt32)

    Returns the numeric value of a JSON object as defined in RFC 4627.

    Declaration
    public static string ToString(uint value)
    Parameters
    Type Name Description
    System.UInt32 value

    The value of the JSON object.

    Returns
    Type Description
    System.String

    A System.String representation of value.

    | Improve this Doc

    ToString(UInt64)

    Returns the numeric value of a JSON object as defined in RFC 4627.

    Declaration
    public static string ToString(ulong value)
    Parameters
    Type Name Description
    System.UInt64 value

    The value of the JSON object.

    Returns
    Type Description
    System.String

    A System.String representation of value.

    • Improve this Doc
    • View Source
    Back to top Copyright 2008-2018 Weubphoria. All rights reserved.
    Generated by DocFX