I have the use case where I need to deserialize json into an object. The json is as follows
{
"additionalAttributes": [
{
"name": "type",
"value": "action"
},
{
"name": "pages",
"value": [
"34",
"39",
"43"
]
},
{
"name": "chapters",
"value": [
"The dawn of time",
"The end of the world"
]
}
]
}
The difficult part is that value is either a string or an array of strings. The resulting object should have an array of strings, even if there is only one string in it.
How can I do this with json.net? The deserializer complains that the first value is not an array of strings.
I cannot change the source json.
Many thanks Maarten