Skip to content

Commit

Permalink
Adds back the bounding box deserializer (#712)
Browse files Browse the repository at this point in the history
  • Loading branch information
Cameron Mace authored Feb 5, 2018
1 parent c15c234 commit 26067ea
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import com.mapbox.geojson.Feature;
import com.mapbox.geojson.Geometry;
import com.mapbox.geojson.Point;
import com.mapbox.geojson.gson.BoundingBoxDeserializer;
import com.mapbox.geojson.gson.BoundingBoxSerializer;
import com.mapbox.geojson.gson.GeometryDeserializer;
import com.mapbox.geojson.gson.GeometryTypeAdapter;
Expand Down Expand Up @@ -56,6 +57,7 @@ public static CarmenFeature fromJson(@NonNull String json) {
Gson gson = new GsonBuilder()
.registerTypeAdapter(Point.class, new PointDeserializer())
.registerTypeAdapter(Geometry.class, new GeometryDeserializer())
.registerTypeAdapter(BoundingBox.class, new BoundingBoxDeserializer())
.registerTypeAdapterFactory(GeocodingAdapterFactory.create())
.create();
return gson.fromJson(json, CarmenFeature.class);
Expand Down

0 comments on commit 26067ea

Please sign in to comment.