How to convert JSON to C# classes?

后端 未结 4 1950

I have a complex JSON object that I want represent as C# class. I have a head start on the parent class called \"Form\", but how can I represent a collection for different t

4条回答
  •  情话喂你
    2020-12-19 07:19

    If you don't have the liberty of using dynamic types from .NET 4 or would like to leverage the benefits that static typing provide, the JSON Class Generator project on codeplex will generate c# classes given a json input string. (shameless plug) I've also taken code from this project and slapped a web UI on it.

提交回复
热议问题