docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method toJson

    toJson(Dictionary<string, object>)

    Convert a Dictionary to JSON.

    Declaration
    public static string toJson(this Dictionary<string, object> obj)
    Parameters
    Type Name Description
    Dictionary<string, object> obj

    The dictionary to convert to JSON.

    Returns
    Type Description
    string

    The converted dictionary in JSON string format.

    toJson(Dictionary<string, string>)

    Convert a Dictionary to JSON.

    Declaration
    public static string toJson(this Dictionary<string, string> obj)
    Parameters
    Type Name Description
    Dictionary<string, string> obj

    The dictionary to convert to JSON.

    Returns
    Type Description
    string

    The converted dictionary in JSON string format.

    toJson(string[])

    Convert a string array to JSON.

    Declaration
    public static string toJson(this string[] array)
    Parameters
    Type Name Description
    string[] array

    The string array to convert to JSON.

    Returns
    Type Description
    string

    The converted dictionary in JSON string format.

    In This Article
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023