I am making an API call. On successful completion I know the structure of JSON response. I can read that and save it on DB using JSON.NET, but if the API calls generates error, a JSON of unknown structure is generated. I have to parse and save it in DB. How can I do that.
In genral structure of error response is this:
{"origin-of_error":"error_message"} There are some cases though where additional key value is also present.
{ foo : bar }or could it be{ foo : bar, zuu : xaa }as well?