docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method ListToJson

    ListToJson<T>(List<T>, bool)

    Convert a c# list into a json list

    Declaration
    public static string ListToJson<T>(List<T> list, bool pretty = false)
    Parameters
    Type Name Description
    List<T> list

    C# list of elements

    bool pretty

    Make the json string human readable(true) or pack as much as possible(false).

    Returns
    Type Description
    string

    A json list containing elements coming from the C# list.

    Type Parameters
    Name Description
    T

    Type of the element in the list.

    In This Article
    Back to top
    Copyright © 2024 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)