I have a list of person objects which I want to send in response to a jquery' ajax request. I want to send the list into JSON format. The list is as follows -
List<Person> PersonList = new List<Person>();
Person X = new Person("X", 23, "This is X");
Person Y = new Person("Y", 24, "This is Y");
PersonList.Add(X);
PersonList.Add(Y);
How can I convert this PersonList list into JSON ?