JSON Generator

JSON Generator generates data using a JSON template.

The dialog box of the JSON Generator contains basic and custom settings. You can customize the generator by changing them as required.

Besides, JSON Generator has Template and Preview dialog boxes. You can customize the default template by changing the default script.

Custom Settings

Template: Shows JSON template.

Preview: Shows preview of data to be generated.

Generator: Click to insert one of Advanced Generators into JSON template.

Default Script

The default script consists of transformation commands (“repeat”, “sort”) and generators (“Gender ()”, “int (0,100)”, “bit ()” …), which generate values for table fields.

Example of default script:

Default script

Repeat

The repeat command specifies the number of repeats of array item.

Usage

Repeat command

Parameters:

  1. min is the minimum number in the range. Type: number. Obligatory.

  2. max is the maximum number in the range. Type: number. Obligatory.

Sort

The sort command specifies the field name by which the items are sorted.

Usage

Sort command

Parameters:

  1. field_name is a field name in an item. Type: text . Obligatory.

Generators

A user may choose from a variety of generators, which are grouped thematically. In order to insert one or another generator into the script, you need to click the Generator button, then select the theme from the drop-down list, for example: Payment and select the desired generator.

Startup priority

If two commands are simultaneously specified at the same level, for example: “repeat (2.5)” and “sort (id)”, then items from 2 to 5 will be first created, then data for the fields will be generated using generators and then the items will be sorted by the “id” field value.

Template source code:

Template source code

Result code:

Result code

Want to Find out More?

Overview

Overview

Take a quick tour to learn all about the key benefits delivered by dbForge Data Generator for MySQL.
Request a demo

Request a demo

If you consider employing the Data Generator for your business, request a demo to see it in action.
Ready to start using dbForge Data Generator for MySQL?