org.h2gis.functions.io.json

## Class JsonWrite

- java.lang.Object
- - org.h2gis.api.AbstractFunction
  - - org.h2gis.functions.io.json.JsonWrite

All Implemented Interfaces:
  org.h2gis.api.Function, org.h2gis.api.ScalarFunction

    public class JsonWrite
    extends org.h2gis.api.AbstractFunction
    implements org.h2gis.api.ScalarFunction

SQL function to write a table to a JSON file.

Author:
  Erwan Bocher (CNRS)

### Field Summary

### Fields inherited from interface org.h2gis.api.ScalarFunction

`PROP_DETERMINISTIC, PROP_NOBUFFER`

### Fields inherited from interface org.h2gis.api.Function

`PROP_NAME, PROP_REMARKS`

### Constructor Summary

Constructors
Constructor and Description
`JsonWrite()`

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`String` `getJavaStaticMethod()`
`static void` `writeGeoJson(Connection connection, String fileName, String tableReference)` Write the JSON file.
`static void` `writeGeoJson(Connection connection, String fileName, String tableReference, String encoding)` Write the JSON file.

### Methods inherited from class org.h2gis.api.AbstractFunction

`addProperty, getProperty, removeProperty`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Methods inherited from interface org.h2gis.api.Function

`getProperty`

### Constructor Detail

#### JsonWrite

    public JsonWrite()

### Method Detail

#### getJavaStaticMethod

    public String getJavaStaticMethod()

Specified by:
  `getJavaStaticMethod` in interface `org.h2gis.api.ScalarFunction`

#### writeGeoJson

    public static void writeGeoJson(Connection connection,
                                    String fileName,
                                    String tableReference,
                                    String encoding)
                             throws IOException,
                                    SQLException

Write the JSON file.

Parameters:
  `connection` -
  `fileName` -
  `tableReference` -
  `encoding` -
Throws:
  `IOException`
  `SQLException`

#### writeGeoJson

    public static void writeGeoJson(Connection connection,
                                    String fileName,
                                    String tableReference)
                             throws IOException,
                                    SQLException

Write the JSON file.

Parameters:
  `connection` -
  `fileName` -
  `tableReference` -
Throws:
  `IOException`
  `SQLException`