Created
January 15, 2024 08:26
-
-
Save jskeet/827ce1c13f0c1b4f0b4eae75e306cd5e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
string json = "[{\"InstanceName\":\"MyInstance\",\"name\":\"serverparam\",\"id\":\"01\"}]"; | |
var result = System.Text.Json.JsonSerializer.Deserialize(json, typeof(Dictionary<string, string>[])); | |
var array = (Dictionary<string, string>[]) result!; | |
Console.WriteLine(array[0]["InstanceName"]); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment