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. |