I am trying to deserialize a json response with the gson lib, the problem is that one json field can be a string or an object.
"artist": "57eaef170e8784aa285d7009"
or
"artist": {
"_id": "57eaef170e8784aa285d7009",
"name": "red hot chili peppers"
}
I don't know how to check wether it's a String or an Object and how to deserialize it properly in my model.