c# serialize 2D array to json code example

Example 1: json 2d array c#

[Serializable] public struct API_RESULT {     public string range;     public string majorDimension;     public string[][] values; }  API_RESULT data = JsonUtility.FromJson<API_RESULT>(req.downloadHandler.text);

Example 2: json 2d array c#

{     "range": "Sheet1!A1:D4",     "majorDimension": "ROWS",     "values": [         ["key", "en-gb", "en-us", "nl-nl"],         ["MAIN_MENU", "main menu", "main menu", "hoofdmenu"],         ["SHOP", "store", "shop", "winkel"],         ["CHARACTER_SELECTION", "character selection", "character selection", "Karakter keuze"]     ] }