1 of 1 people found this helpful
There are several ways to do this.
The post below shows how to use the dynamic type in C# along with the JSON.NET library to navigate the JSON tree. Using this, you don't need to create a class representing the JSON, but dynamic type will bypass static type checking (so you may get more runtime errors if not careful)
The other way is to create the C# class type that the JSON will be deserialized as. JSON.NET can be used for this purpose. See example below:
Usually, if you're just looking to grab a few values from the returned JSON and not reuse it, I prefer the dynamic option instead of creating a corresponding class for the JSON structure.
If you can post some sample code, we might be able to provide more specific suggestions.
Thank for the response, that's exactly what I need. I can grab the info I need to create the JSON file. Dynamic type will be useful.