public class BoundingBoxSerializer extends java.lang.Object implements com.google.gson.JsonSerializer<BoundingBox>
BoundingBox
object inside a GeoJson object to a JSON
element which can be read by GSON and added to the final JSON output.Constructor and Description |
---|
BoundingBoxSerializer()
Empty constructor to prevent relying on the default one.
|
Modifier and Type | Method and Description |
---|---|
com.google.gson.JsonElement |
serialize(BoundingBox src,
java.lang.reflect.Type typeOfSrc,
com.google.gson.JsonSerializationContext context)
Converts the
BoundingBox object into a JsonArray. |
public BoundingBoxSerializer()
public com.google.gson.JsonElement serialize(BoundingBox src, java.lang.reflect.Type typeOfSrc, com.google.gson.JsonSerializationContext context)
BoundingBox
object into a JsonArray.serialize
in interface com.google.gson.JsonSerializer<BoundingBox>
src
- a BoundingBox
typeOfSrc
- common superinterface for all types in the Javacontext
- context for deserialization that is passed to a custom deserializer during
invocation of its JsonDeserializationContext
method