public class PodcastsDeserializer extends java.lang.Object implements com.google.gson.JsonDeserializer<Podcasts>
Podcasts object.
It happens that the response could contain an object with name "channel" that is a JSON Array when it has more than one child, but it is a JSON Object when there is only one child.
{
channel : [
{
//CHILD_ONE
},
{
//CHILD_TWO
},
{
//CHILD_THREE
}
]
}
{
channel : {
//CHILD_ONE
}
}
| Constructor and Description |
|---|
PodcastsDeserializer() |
| Modifier and Type | Method and Description |
|---|---|
Podcasts |
deserialize(com.google.gson.JsonElement json,
java.lang.reflect.Type typeOfT,
com.google.gson.JsonDeserializationContext context) |
public Podcasts 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<Podcasts>com.google.gson.JsonParseException