// if geometry column exists, write it
if (geometryColumn > -1) {
BytesWritable bytesWritable = (BytesWritable)fieldWritables.get(geometryColumn);
if (bytesWritable == null) {
jsonGen.writeObjectField("geometry", null);
} else {
OGCGeometry ogcGeometry = GeometryUtils.geometryFromEsriShape(bytesWritable);
jsonGen.writeRaw(",\"geometry\":" + GeometryEngine.geometryToJson(ogcGeometry.getEsriSpatialReference(),
ogcGeometry.getEsriGeometry()));
}