I work with API using Retrofit. data of two types can come: First type: 
Second type
The problem is in the variable cover. It can be an array, and it can be boolean.
@SerializedName("cover") private boolean cover; two variables of the same name of even different types cannot be
And accordingly jumps out exception. How to solve this problem?

Object, and then result in aBoolean/HashMapdepending on the content? Disassemble into different variables? - VAndrJboolean, butnull. Happens"cover": true? - zRrrbooleanin the model, so gson is trying to cram it in. Declare, indeed, asObject, not theTypeAdapterto write ... - zRrr