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