c# convert class to json structure 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);