public class GetRandomSongsResponseDeserializer extends java.lang.Object implements com.google.gson.JsonDeserializer<GetRandomSongsResponse>
GetRandomSongsResponse
object.
It happens that the response could contain an object with name "randomSongs" that is a JSON Object when there is only one child and an empty String when it has no childs.
{ randomSongs : { //CHILDS } }
{ randomSongs : "" }
Constructor and Description |
---|
GetRandomSongsResponseDeserializer() |
Modifier and Type | Method and Description |
---|---|
GetRandomSongsResponse |
deserialize(com.google.gson.JsonElement json,
java.lang.reflect.Type typeOfT,
com.google.gson.JsonDeserializationContext context) |
public GetRandomSongsResponse deserialize(com.google.gson.JsonElement json, java.lang.reflect.Type typeOfT, com.google.gson.JsonDeserializationContext context) throws com.google.gson.JsonParseException
deserialize
in interface com.google.gson.JsonDeserializer<GetRandomSongsResponse>
com.google.gson.JsonParseException