Thursday, November 20, 2014

Create C# classes using a JSON response

Assume you have a JSON access point and the response is like below(This is accessed via Fiddler).
Copy that JSON response and format it using a JSON viewer. In this demo I have used http://jsonviewer.stack.hu/.
Copy the code snippet as highlighted.
Create an empty class file in Visual Studio.
The you can paste the JSON code as classes like below.
The created classes will be look like below.

No comments:

Post a Comment