Author: pinoyz | Posted on: 5/25/2010 11:35:39 PM | Views : 274

Hi,


I'm using Sys.Serialization.JavaScriptSerializer.deserialize to deserialize the json. unfortunately I got an error saying that my data does not correspond a valid json.


Here's my Class.

public class CARS { private string Name; private string Address; public string _Name { get { return Name; } set { Name = value; } } public string _Address { get { return Address; } set { Address = value; } } }
Here's my WebMethod



[WebMethod] public List<CARS> GetJSON() { List<CARS> a = new List<CARS>(); CARS car = new CARS(); car._Name = "Ian"; car._Address = "Pasay"; a.Add(car); return a.ToList(); }
my Javascript

Go to the complete details ...