I am deserializing JSON from a WebService using the JSON.NET framework. I have to use the 3.5 R8 Version of the framework, because I am working on .NET CF.
I have never used JSON.NET before so I could use your help.
The problem
I have to deserialize a lot of different files. They all have a root that I want to skip because it means an extra "layer" on my model.
The extra layer is called "response" and is an array.
An example
{
"response": [
{
"ID": 141
"Supervisor": "Joey James",
"Worker" :
{
"Last Name": "Gates",
"Surname": "Jim"
}
}
]
}
Expected behavior
I want to skip the "response" object that exists in every response from the WebService. I think it could be possible using the JSON.NET framework and without having to do string functions myself. There is a similar question that is great if you want to parse one single JSON response. I need something that works for a lot of different responses with quite some data. I would like to solve this with the JSON Settings, if possible.
What I have tried so far Right now I got this working with a wrapper class. I am searching for a way to skip this step and make it better.
Thanks!