Hi..,
I can give you a simple example for deserializing it.
Here is my simple sample code which would give you some idea about it.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication4
{
public class Product
{
public string id { get; set; }
public string name { get; set; }
public List<Location> Location { get; set; }
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication4
{
public class Location
{
public string id { get; set; }
public string name { get; set; }
public string resources { get; set; }
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
namespace ConsoleApplication4
{
class Program
{
static void Main(string[] args)
{
var jsonResponse = "[{'Id':'2','Name':'Watch','Location':[{'id':'4','name':'chandru',resources:'kesavan'}]},{'Id':'3','Name':'TV','Location':[{'id':'4','name':'chandru',resources:'kesavan'}]},{'Id':'4','Name':'kannan','Location':[{'id':'4','name':'chandru',resources:'kesavan'}]}]";
var jsonlist = JsonConvert.DeserializeObject<List<Product>>(jsonResponse);
}
}
}
By doing this you can convert your json data to your comfortability.
I think this will solve your problem surely.
Have a great day!!!