JSON to C#

Do you ever get tired of translating JSON to the equivalent C# shape for your app? I do. One of the tools that I like to use is quicktype. It is a web app that will allow you to paste in some JSON and it will generate the C# classes for you. That’s a pretty good start.

But it gets better than that. If you are like most, and you use NewtonSoft Json.NET (if you don’t, you should check it out), it will decorate the properties it generates with the [JsonProperty] attributes with the property name from JSON while the C# property has the standard casing.

It also has features for handling things like enums, maps, lists or arrays among others.


Check it out, I love it.