2016-03-04

Convert C# object to JSON string

Simple.

var javaScriptSerializer = new
    System.Web.Script.Serialization.JavaScriptSerializer();
string jsonString = javaScriptSerializer.Serialize(products);
Console.WriteLine(jsonString);

No comments:

Post a Comment