public class PointAdapter extends Object implements com.google.gson.JsonSerializer<Point>, com.google.gson.JsonDeserializer<Point>
| Constructor and Description |
|---|
PointAdapter() |
| Modifier and Type | Method and Description |
|---|---|
Point |
deserialize(com.google.gson.JsonElement json,
Type typeOfT,
com.google.gson.JsonDeserializationContext context) |
com.google.gson.JsonElement |
serialize(Point src,
Type srcType,
com.google.gson.JsonSerializationContext context)
Converts a GeoJson coordinate to an array with either
[longitude, latitude] or
[longitude, latitude, elevation] if elevation is defined.
|
public com.google.gson.JsonElement serialize(Point src, Type srcType, com.google.gson.JsonSerializationContext context)
serialize in interface com.google.gson.JsonSerializer<Point>public Point deserialize(com.google.gson.JsonElement json, Type typeOfT, com.google.gson.JsonDeserializationContext context) throws com.google.gson.JsonParseException
deserialize in interface com.google.gson.JsonDeserializer<Point>com.google.gson.JsonParseExceptionCopyright © 2017–2018. All rights reserved.