using System.Collections.Generic;
public static void Main()
string str = "{\"page\":\"admin\",\"context\":\"id\",\"records\":{\"rCount\":6,\"1\":[{\"name\":\"Romeo\",\"dob\":\"01/01/1970\"},{\"name\":\"Harry\",\"dob\":\"10/10/2012\"},{\"name\":\"Lee\",\"dob\":\"17/10/2012\"}],\"2\":[{\"name\":\"Mark\",\"dob\":\"01/01/1970\"},{\"name\":\"Jack\",\"dob\":\"10/10/2012\"},{\"name\":\"Json\",\"dob\":\"17/10/2012\"}]}}";
var recordFile = JsonConvert.DeserializeObject<RecordFile>(str, new JsonSerializerSettings
Error = (sender, args) =>
if (args.ErrorContext.Path == "records.rCount")
args.ErrorContext.Handled = true;
Console.Write(JsonConvert.SerializeObject(recordFile, Formatting.Indented));
public string Page { get; set; }
public string Context { get; set; }
public Dictionary<string, Record[]> Records { get; set; }
public string Name { get; set; }
public string Dob { get; set; }