c# serialize deserialize json code example Example: how to convert object in string JSON c# var json = new JavaScriptSerializer().Serialize(obj);