GeometrySerializer ser = new GeometrySerializer();
GeometryFactory factory = new GeometryFactory(new PrecisionModel(100.0), 31300);
CoordinateArraySequence coords = new CoordinateArraySequence(new Coordinate[] {
new Coordinate(12.0, 34.23), new Coordinate(12.000, 54.555), new Coordinate(-0.01, -0.0)});
LineString l = new LineString(coords, factory);
MultiLineString m = new MultiLineString(new LineString[] {l}, factory);
JSONObject jo = (JSONObject) ser.marshall(null, m);
assertEquals("MultiLineString", jo.get("type").toString());
assertEquals("31300", jo.get("srid").toString());
assertEquals("2", jo.get("precision").toString());
JSONArray lineStrings = jo.getJSONArray("lineStrings");