JSON is a popular alternative to XML where an object is stored in a string that can be deserialised and loaded into a class of any language that has a JSON parser to support it. .NET supports a dynamic class type that will allow you to load the JSON string into a dynamic class that does not have to be defined in advance. It does leave your code open to exceptions if variable naming is not kept consistent.
If you want to use defined classes for deserialising JSON, the tool below will allow you to convert JSON to a C# class. Paste the JSON string of an object into the box below and it will convert it to a C# class for you.
Unsupported Variable Names In C#
C# does not allow variable names that conflict with reserved words for the language. Words such as object, string etc can’t be used as variable names in C# and if they are used in the JSON object that you provide, they will be removed.