Utils

JSON Constructor Overview

JSON Constructor is a special method that is called for generating JSON objects from existing items. It take a scheme editor as an argument. Scheme Editor allows you to generate JSON scheme and see the method result. In brief, this editor does such a chore as writing dozens of similar JSON objects much more faster and easier by converting data.

JSON Constructor cannot edit the source data.

JSON Constructor also has a comfortable for users visual editor. It consists of four parts:

Name Description
Types contains basic code entities
Editor a space where you gather together elements and fill them in; details...
Scheme shows a JSON scheme; details...
Result shows a result of the converting

The user can interact only with the first two items. The last ones only shows the result of converting.

Scheme Editor

Scheme editor is a functional part of the JSON constructor. It takes chosen items, converts it and gather them in JSON format that can be edited. Also, constructor can save the result in the application and allows to copy it.

Types

Types is the first and the smallest item in the view. It contains four elements: three blocks, that you can drag-and-drop into editor, and delete field.

Blocks

As mentioned above, you can drag-and-drop block to the editor. They contains general elements of JSON code: array, object, and property. In order to build your code, you have to use them.

Example of dragging and dropping entities

Delete field

This is a field for deleting elements from editor. In order to remove extra blocks, drag-and-drop them to this field.

Example of deleting entities from Editor

Editor

This is an instrument that helps you to create a scheme and immediately see the result. Namely, it helps to gather together all elements, edit and fill them.

When you add elements into editor, they change their look. Also, the edit button appears. Click it and you open the small edit window. Read more about Editor.

Examples of entities settings

Scheme

This is an item that displays the code schematic converted from the editor. This scheme is just outline. We can say that it shows the basic object structure of the final JSON code. Read more about Scheme.

Example of JSON scheme

Also, Scheme has a button that allows you to copy received code scheme.

Example of the copy button of the scheme

Result

This is the item where the final JSON object is displayed.

Final JSON of the example item