First your json is invalid. Here is the same one but with fixes.
{"data":[{"name":"123","pwd":123},{"name":"456","pwd":456},{"name":"789","pwd":789}],"duration":5309,"query":"myquery","timeout":300}
And with this json model should look like this:
public class Rootobject
{
public Datum[] data { get; set; }
public int duration { get; set; }
public string query { get; set; }
public int timeout { get; set; }
}
public class Datum
{
public string name { get; set; }
public int pwd { get; set; }
}
7
solved Deserializing json C# [duplicate]