JSON structure
{
"error": "RecordInvalid",
"description": "Record validation errors",
"details": {
"email": [
{
"description": "Email: mark.vaugh@gmail.com is already being used by another user",
"error": "DuplicateValue"
}
],
"name": [
{
"description": "Name: is too short (minimum one character)",
"error": "ValueTooShort"
}
]
}
}
Property names "details", "details:email", and "details:name" are dynamic(see screenshot)
Here are the POCO classes:
public class ZendeskError
{
[JsonProperty("details")]
public Dictionary<string, List<ErrorKeyValue>> ErrorDetails { get; set; }
[JsonProperty("description")]
public string ErrorDescription { get; set; }
[JsonProperty("error")]
public string Error { get; set; }
}
public class ErrorKeyValue
{
public KeyValuePair<string, List<PropertyFailureInformation>> PropertyError { get; set; }
}
public class PropertyFailureInformation
{
[JsonProperty("description")]
public string Description { get; set; }
[JsonProperty("error")]
public string Error { get; set; }
}
Everything works well except the binding to class PropertyFailureInformation - see screenshot.
Please advise where I am going wrong?