csharp print object to json
Code Example - csharp print object to json
var json = new JavaScriptSerializer().Serialize(ObjectModel);
object to json csharp
using Newtonsoft.Json;
var jsonString = JsonConvert.SerializeObject(obj);
how to convert object in string JSON csharp
var json = new JavaScriptSerializer().Serialize(obj);
csharp object to json string
Newtonsoft.Json.JsonConvert.SerializeObject(new {foo = "bar"})
string to json csharp
JObject json = JObject.Parse(str);
string json to class csharp
var result = JsonConvert.DeserializeObject<YourClass>(jsonstring);