I'm receiving a JSON object from a public API with a property that, itself, is an escaped JSON string.
{
"responses":[
{
"info":"keep \"this\" in a string",
"body":"{\"error\":{\"message\":\"Invalid command\",\"type\":\"Exception\",\"code\":123}}"
},
{
"info":"more \"data\" to keep in a string",
"body":"{\"error\":{\"message\":\"Other error\",\"type\":\"Exception\",\"code\":321}}"
}
]
}
How do I convert this property into an actual JSON object (unescaped) in order to deserialize the entire response using NewtonSoft Json.NET?
"Error converting value [JSON String] to type '[MyClass]'. Path 'responses[0].body', line 1, position 641."
– Kcoder