Follow these steps:
- Convert your JSON to C# using json2csharp.com;
- Create a class file and put the above generated code in there;
- Add the
Newtonsoft.Json
library to your project using the Nuget Package Manager; -
Convert the JSON received from your service using this code:
RootObject r = JsonConvert.DeserializeObject<RootObject>(json);
(Feel free to rename RootObject
to something more meaningful to you. The other classes should remain unchanged.)