Package com.mapbox.geojson
Class PointAsCoordinatesTypeAdapter
java.lang.Object
com.google.gson.TypeAdapter<T>
com.mapbox.geojson.PointAsCoordinatesTypeAdapter
public class PointAsCoordinatesTypeAdapter
extends com.google.gson.TypeAdapter<T>
TypeAdapter to serialize Point as coordinates, i.e array of doubles and
to deserialize into Point out of array of doubles.
- Since:
- 4.6.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionread(com.google.gson.stream.JsonReader in) protected PointreadPoint(com.google.gson.stream.JsonReader in) readPointList(com.google.gson.stream.JsonReader in) voidprotected voidwritePoint(com.google.gson.stream.JsonWriter out, Point point) protected voidwritePointList(com.google.gson.stream.JsonWriter out, List<Double> value) Methods inherited from class com.google.gson.TypeAdapter
fromJson, fromJson, fromJsonTree, nullSafe, toJson, toJson, toJsonTree
-
Constructor Details
-
PointAsCoordinatesTypeAdapter
public PointAsCoordinatesTypeAdapter()
-
-
Method Details
-
write
- Specified by:
writein classcom.google.gson.TypeAdapter<Point>- Throws:
IOException
-
read
- Specified by:
readin classcom.google.gson.TypeAdapter<Point>- Throws:
IOException
-
writePoint
- Throws:
IOException
-
readPoint
- Throws:
IOException
-
writePointList
protected void writePointList(com.google.gson.stream.JsonWriter out, List<Double> value) throws IOException - Throws:
IOException
-
readPointList
- Throws:
IOException
-