code: public static void writeGeoJson(Connection connection, String fileName, String tableReference, String encoding) throws IOException, SQLException {
              JsonDriverFunction jsonDriver = new JsonDriverFunction();
              jsonDriver.exportTable(connection,tableReference, URIUtilities.fileFromString(fileName), new EmptyProgressVisitor(),encoding);
      }
docs: Write the JSON file.
  
  @param connection
  @param fileName
  @param tableReference
  @param encoding
  @throws IOException
  @throws SQLException