Assuming you want id
as the key and Person
as the value, you can do something like this.
public class Person
{
public int id { get; set; }
public string name { get; set; }
public int type { get; set; }
}
string jsonString = @"[
{
'id': 1,
'name': 'David',
'type': 0
},
{
'id': 12,
'name': 'John',
'type': 0
}
]";
var dictionary = JsonConvert.DeserializeObject<IEnumerable<Person>>(jsonString).
Select(p => (Id: p.id, Record: p)).
ToDictionary(t => t.Id, t => t.Record);