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