Please copy your JSON string and paste it into the input left editor and please make sure your JSON string is properly structured using curly braces ({ }
) and avoid any syntax-breaking characters so that it can convert successfully
{ "name": "Alice", "age": 25, "isEmployed": true, "salary": 60000.50, "occupation": null }
By Clicking on the Convert button and your C# class will be generated instantly in the right side editor.
Root
class as your base model class.Newtonsoft.Json
. or any other of your choiceOur tool will provide a ready-to-use class model tailored to your JSON structure like the below example class
public class Root { public string name { get; set; } public int age { get; set; } public bool isEmployed { get; set; } public double salary { get; set; } public object occupation { get; set; } }
How to deserialization example JSON string:
Root myDeserializedClass = JsonConvert.DeserializeObject<Root>(myJsonResponse);