Search in sources :

Example 1 with Crs

use of org.geojson.Crs in project geojson-jackson by opendatalab-de.

the class CrsTest method itShouldSerializeCrsWithLink.

@Test
public void itShouldSerializeCrsWithLink() throws Exception {
    Point point = new Point();
    Crs crs = new Crs();
    crs.setType(CrsType.link);
    point.setCrs(crs);
    String value = mapper.writeValueAsString(point);
    assertEquals("{\"type\":\"Point\",\"crs\":{\"type\":\"link\",\"properties\":{}}}", value);
}
Also used : Crs(org.geojson.Crs) Point(org.geojson.Point) Test(org.junit.Test)

Aggregations

Crs (org.geojson.Crs)1 Point (org.geojson.Point)1 Test (org.junit.Test)1