> For the complete documentation index, see [llms.txt](https://doc.sysdevmobile.com/kalipso/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc.sysdevmobile.com/kalipso/6.0/documentation/actions/group-code-flow/json-export-from-table.md).

# JSON Export from Table

Exports from a Database Table to text or a JSON file.

Action available for the following operating systems:

<figure><img src="https://1102213384-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FM6Wz3tBjSWbCweZ8NltT%2Fuploads%2FruABjDF2Z7iy255xGivq%2F01_Supported_OS.png?alt=media&amp;token=166f7395-72c9-406f-91f1-e41412516cba" alt="OS Supported: Android, iOS, Win, Win32"><figcaption></figcaption></figure>

### Parameters

General

* **Target type** - Defines the type of the target. It can be one of:
  * 1\. Yes
  * 2\. No
* **Encoding** - Indicates the file encoding to use. It can be one of:
  * 1\. Unicode UTF-16 LE (each character uses 2 bytes)
  * 2\. ANSI/BINARY (each character uses 1 byte)
  * 3\. Unicode UTF-8 (each character uses 1 byte to 4 bytes)
* **Target File** - The name of the target.

{% hint style="info" %}
User must define a control or a variable to be a target. Also is possible to save in a file, by defining the complete path and name to the file.
{% endhint %}

* **Database Profile** - The name of the Database Profile defined.
* **SQL** - The SQL code to define the Database Table.

{% hint style="info" %}
For sub-queries, you can use function **COL\_EXPORT**(tableIndex, colIndex) for accessing parent Tables columns to use as filter in your SQL query.
{% endhint %}

* **JSON Prefix** string - The JSON Prefix to each JSON item.
* **JSON Suffix** string - The JSON Sufix to each JSON item.

Column List

* **Array/Item Name** string - The JSON item to save in the file.
* **Export as** - The type of export to be made. It can be one of:
  * Array of Objects
  * Array of Values
  * Single Element
* **Item** - The JSON item to save in the file.
* **Type** - The type of the JSON item to save in the file.
* **Value** - The value to save in the file.

{% hint style="info" %}
In Unicode UTF-16 LE, the BOM (Byte Order Mark) 0xFEFF will be added to the beginning of the file.
{% endhint %}

{% hint style="info" %}
In Unicode UTF-8, no BOM (Byte Order Mark) will be added.
{% endhint %}

{% hint style="info" %}
The actions [File Open](/kalipso/6.0/documentation/actions/group-files/file-open.md) and [File Close](/kalipso/6.0/documentation/actions/group-files/file-close.md) don't need to be used.
{% endhint %}
