private GeometryCollection parseGeometryCollection(JsonParser jp) throws IOException, SQLException {
        jp.nextToken(); // FIELD_NAME geometries        
        String coordinatesField = jp.getText();
        if (coordinatesField.equalsIgnoreCase(GeoJsonField.GEOMETRIES)) {
            jp.nextToken();//START array
            jp.nextToken();//START object
            ArrayList<Geometry> geometries = new ArrayList<Geometry>();
            while (jp.getCurrentToken() != JsonToken.END_ARRAY) {
                jp.nextToken(); // FIELD_NAME type     
                jp.nextToken(); //VALUE_STRING Point
                String geometryType = jp.getText();
                geometries.add(parseGeometry(jp, geometryType));
                jp.nextToken();
            }
            jp.nextToken();//END_OBJECT } geometry
            return GF.createGeometryCollection(geometries.toArray(new Geometry[0]));
        } else {
            throw new SQLException("Malformed GeoJSON file. Expected 'geometries', found '" + coordinatesField + "'");
        }

    }
private GeometryCollection parseGeometryCollection ( JsonParser jp ) throws IOException , SQLException { jp . nextToken ( ) ; String coordinatesField = jp . getText ( ) ; if ( coordinatesField . equalsIgnoreCase ( GeoJsonField . GEOMETRIES ) ) { jp . nextToken ( ) ; jp . nextToken ( ) ; ArrayList < Geometry > geometries = new ArrayList < Geometry > ( ) ; while ( jp . getCurrentToken ( ) != JsonToken . END_ARRAY ) { jp . nextToken ( ) ; jp . nextToken ( ) ; String geometryType = jp . getText ( ) ; geometries . add ( parseGeometry ( jp , geometryType ) ) ; jp . nextToken ( ) ; } jp . nextToken ( ) ; return GF . createGeometryCollection ( geometries . toArray ( new Geometry [ 0 ] ) ) ; } else { throw new SQLException ( "Malformed GeoJSON file. Expected 'geometries', found '" + coordinatesField + "'" ) ; } }
Each element in the geometries array of a GeometryCollection is one of
the geometry objects described above:

{ "type": "GeometryCollection", "geometries": [ { "type": "Point",
"coordinates": [100.0, 0.0] }, { "type": "LineString", "coordinates": [
[101.0, 0.0], [102.0, 1.0] ] } ]

@param jp

@throws IOException
@throws SQLException
@return GeometryCollection