GeoJSON java library

Geotools as a support for geojson. See here.

Otherwise, you could simply use a typical JSON parser (such as json-simple) together with the geoJSON spec, which is really easy to use.

The best solution depends on what you want to do with the parsed information.


To parse or deserialize geojson in Java REST webservice, i prefere to use geojson-jackson , which integrate itself very nicely with jackson.


Another alternative is GeoGson, which is built on top of Google's Gson:

Geometry geometry = new GsonBuilder()
        .registerTypeAdapterFactory(new GeometryAdapterFactory())
        .create()
        .fromJson("{\"type\":\"Point\",\"coordinates\": [23.5,20.125]}");

Tags:

Java

Json

Geojson