public static void Example1()
var json = @"{'SomeObject': {'SomeInnerObject': {'SomeProperty': {'Id': '123','Type': 'abc','Name': 'some value'}}}}";
var result = JsonConvert.DeserializeAnonymousType(json, template);
var id = result.SomeObject.SomeInnerObject.SomeProperty.Id;
var type = result.SomeObject.SomeInnerObject.SomeProperty.Type;
var name = result.SomeObject.SomeInnerObject.SomeProperty.Name;
Console.WriteLine("{0} {1} {2}", id, type, name);
public static void Example2()
var json = @"{ 'SomeObjects': [ { 'Id': '123', 'Name': 'some value' }, { 'Id': '456', 'Name': 'another value' } ]}";
SomeObjects = new [] { new { Id=default(int), Name=default(string)} }
var result = JsonConvert.DeserializeAnonymousType(json, template);
foreach (var element in result.SomeObjects)
Console.WriteLine("{0} {1}", element.Id, element.Name);
static public void Main()