public class BoundingBoxDeserializer extends java.lang.Object implements com.google.gson.JsonDeserializer<BoundingBox>
BoundingBox
object for easier consumption in developers java applications.Constructor and Description |
---|
BoundingBoxDeserializer()
Empty constructor to prevent relying on the default one.
|
Modifier and Type | Method and Description |
---|---|
BoundingBox |
deserialize(com.google.gson.JsonElement json,
java.lang.reflect.Type typeOfT,
com.google.gson.JsonDeserializationContext context)
When deserializing a GeoJSONs optional bounding box, we want to convert the JsonArray to a
BoundingBox object for easier consumption in developers java applications. |
public BoundingBoxDeserializer()
public BoundingBox deserialize(com.google.gson.JsonElement json, java.lang.reflect.Type typeOfT, com.google.gson.JsonDeserializationContext context)
BoundingBox
object for easier consumption in developers java applications.deserialize
in interface com.google.gson.JsonDeserializer<BoundingBox>
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)
methodBoundingBox
object representing the values originally in the JSONcom.google.gson.JsonParseException
- this exception is raised if there is a serious issue that occurs
during parsing of a Json string