convert .NET class to json using c# code example
Example 1: string json to class c#
var result = JsonConvert.DeserializeObject<YourClass>(jsonstring);
Example 2: c# convert object to json
var jsonString = JsonConvert.SerializeObject(ObjectModel);