public class PointDeserializer extends java.lang.Object implements com.google.gson.JsonDeserializer<Point>
Point
s capturing the same information.
Otherwise when deserializing, you'll most likely see this error: Required to handle the
"Expected BEGIN_OBJECT but was BEGIN_ARRAY".Constructor and Description |
---|
PointDeserializer()
Empty constructor to prevent relying on the default one.
|
Modifier and Type | Method and Description |
---|---|
Point |
deserialize(com.google.gson.JsonElement json,
java.lang.reflect.Type typeOfT,
com.google.gson.JsonDeserializationContext context)
Deserialize the coordinates inside the json into
Point s capturing the same information. |
public PointDeserializer()
public Point deserialize(com.google.gson.JsonElement json, java.lang.reflect.Type typeOfT, com.google.gson.JsonDeserializationContext context)
Point
s capturing the same information.
Otherwise when deserializing, you'll most likely see this error: Required to handle the
"Expected BEGIN_OBJECT but was BEGIN_ARRAY".deserialize
in interface com.google.gson.JsonDeserializer<Point>
json
- a class representing an element of JsontypeOfT
- common superinterface for all types in the Javacontext
- Context for deserialization that is passed to a custom deserializer during
invocation of its JsonDeserializer.deserialize(JsonElement, Type,
JsonDeserializationContext)
methodPoint
with an altitude or one that doesn't