Search Results for

    Show / Hide Table of Contents

    Class JsonDictionaryUtility

    Inheritance
    object
    JsonDictionaryUtility
    Namespace: i5.Toolkit.Core.Utilities
    Assembly: cs.temp.dll.dll
    Syntax
    public static class JsonDictionaryUtility

    Methods

    FromJson<K, V>(string)

    Deserializes a JSON string to a dictionary

    Declaration
    public static Dictionary<K, V> FromJson<K, V>(string json)
    Parameters
    Type Name Description
    string json

    The json string which should be parsed

    Returns
    Type Description
    Dictionary<K, V>

    Returns the deserialized dictionary

    Type Parameters
    Name Description
    K

    The type of the dictionary's keys

    V

    The type of the dictionary's values

    ToJson<K, V>(Dictionary<K, V>, bool)

    Serializes a dictionary to a JSON string

    Declaration
    public static string ToJson<K, V>(Dictionary<K, V> dict, bool prettyPrint = false)
    Parameters
    Type Name Description
    Dictionary<K, V> dict

    The dictionary which should be serialized

    bool prettyPrint

    If true, the JSON string will be formatted to be better human-readable

    Returns
    Type Description
    string

    Returns the serialized JSON string

    Type Parameters
    Name Description
    K

    The type of the dictionary's keys

    V

    The type of the dictionary's values

    In this article
    Back to top i5 Toolkit Documentation