I have several services that return three fields (json). FailureMessage (string, in case something wrong happens) Success (boolean) [Custom] (object of return) Examples below:
1)
{
"FailureMessage": "",
"Success": true,
"Cities": []
}
2)
{
"FailureMessage": "",
"Success": true,
"Regions": []
}
Is there a way to map then in a generic way?
Now, I have the first 2 properties mapped to a GenericResponse, and other classes extending GenericResponse and creating the third attribute in each one.
Thanks in advance