Let\'s say I have an object MyObject that looks like this:
public class MyObject { int ObjectID {get;set;} string ObjectString {get;set;} }
3 years of experience later, I've come back to this question and would suggest to write it like this:
string output = new JavaScriptSerializer().Serialize(ListOfMyObject);
One line of code.