Skip to content

Instantly share code, notes, and snippets.

@jskeet
Created January 15, 2024 08:26
Show Gist options
  • Save jskeet/827ce1c13f0c1b4f0b4eae75e306cd5e to your computer and use it in GitHub Desktop.
Save jskeet/827ce1c13f0c1b4f0b4eae75e306cd5e to your computer and use it in GitHub Desktop.
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