Search Results for

    Show / Hide Table of Contents

    Class DiscordJson

    Represents discord json.

    Inheritance
    System.Object
    DiscordJson
    Namespace: DisCatSharp.Net.Serialization
    Assembly: DisCatSharp.dll
    Syntax
    public static class DiscordJson

    Methods

    | Improve this Doc View Source

    PopulateObject(JToken, Object)

    Populates an object with the values from a JSON node.

    Declaration
    public static void PopulateObject(JToken value, object target)
    Parameters
    Type Name Description
    Newtonsoft.Json.Linq.JToken value

    The token to populate the object with.

    System.Object target

    The object to populate.

    | Improve this Doc View Source

    SerializeObject(Object)

    Serializes the specified object to a JSON string.

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

    The object to serialize.

    Returns
    Type Description
    System.String

    A JSON string representation of the object.

    | Improve this Doc View Source

    ToDiscordObject<T>(JToken)

    Converts this token into an object, passing any properties through extra Newtonsoft.Json.JsonConverters if needed.

    Declaration
    public static T ToDiscordObject<T>(this JToken token)
    Parameters
    Type Name Description
    Newtonsoft.Json.Linq.JToken token

    The token to convert

    Returns
    Type Description
    T

    The converted token

    Type Parameters
    Name Description
    T

    Type to convert to

    • Improve this Doc
    • View Source
    In This Article
    Back to top © 2021-2022 Aiko IT Systems