Anyone now of a nice way to do this, I am interacting with a API, and apart from the expected response , it can give about 3 different body responses in case of an error, depending on the error. Is there any way I can with gson or moshi, attempt to deserialize to one object type, and if fail, try the next one. Similar to how circe's
attemptAs
work in the scala world.