Hello ! I want to decode an error, but the respon...
# serialization
d
Hello ! I want to decode an error, but the response from an external API is .. changeable.. Once, I receive the errors like :
Copy code
{
"errors":[..]
}
And another time
Copy code
{
  "data": {
    "error": ".."
  }
}
For the moment, I'm decoding to JsonElement and read each cases. But is there a way to do that automatically with the annotations ?
d
I think first is more adapted, thanks a lot !