In Database Tour software, you can export data to JSON from any supported database type.

Solution 1: Using Predefined JSON Format

  1. Open your source dataset, i.e. select a table from the table list or execute a SQL query.
  2. If you chose the table, switch to Data page.
  3. Click Export Data button.
  4. Switch to JSON tab.
  5. Specify the target filename. Specify needed export options (make sure to choose correct export mode). Click Next.
  6. Specify source-to-target table mappings. Click Export button.

Solution 2: Using Custom Target Format

It requires more effort from the user, but gives an ability to use non-standard approaches.

  1. Open your source dataset.
  2. If you chose the table, switch to Data page.
  3. Click Export Data button.
  4. Switch to Custom tab.
  5. Specify the target filename.
  6. In the Expression field, type the expression like this:
    '{' +
    '"ID":' + to_string(dataset_field_val(1, 'ID')) + ', ' +
    '"FIRSTNAME": "' + dataset_field_val(1, 'FIRSTNAME') + '", ' +
    '"LASTNAME": "' + dataset_field_val(1, 'LASTNAME') + '", ' +
    '"CITY": "' + dataset_field_val(1, 'CITY') + '", ' +
    '"COUNTRY": "' + dataset_field_val(1, 'COUNTRY') + '"' +
    '}'
  7. Click Export button.

Saving and Loading Export Definitions

Developing custom formula may take some time. If you would like to reuse it multiple times, it is recommended to save all export definitions to file by choosing Tools | Save Export Definitions... in Export dialog. To load the definitions from the file, choose Tools | Load Export Definitions.... Such a practice can save your time and guaranties that specified combination of options will be exactly reproduced.

Saving Export Definitions

See also

 Exporting Data

 JSON Export Format

 Command Line Usage: Export / Import Data

 Action File