Altova XMLSpy 2024 Enterprise Edition

Editing Document Structure

Home Prev Top Next

You can edit the JSON document structure by adding new components, and deleting or moving the selected grid blocks. You can edit document structure in any of the following ways:

 

Select a component and right-click to use the commands in its context menu (see screenshot below). The commands are described in the section Context Menu.

Use the editing buttons that are available in cells. These buttons are described in the section In-cell Command Buttons below.

Select a component and drag-and-drop it to a new location to modify the structure.

Click to expand/collapse

Shortcuts of commands for building a structure are listed in the table below.

 

Command

Shortcut

Insert (Sibling) After

Ctr+Enter

Insert (Sibling) Before

Ctr+Shift+Enter

Append (Sibling)

Ctr+E

Add Child

Ctr+Alt+Enter

Wrap in Array

Ctr+W

Wrap in Object

Ctr+Shift+W

 

Note:If a component is added, say, as a property (inserted, appended, or added as child) and you wish to change its type to object or array, do this by clicking the component's type symbol and selecting the type you want.

 

In-cell command buttons

In JSON Grid View, buttons in the cells of the grid provide functionality that is available in the context of the respective cell. Using these button commands is a faster and easier way to carry out commonly used operations. The available in-cell button commands are listed in the table below. Display-related commands are shown with a blue background. Commands for editing the document (structure and content) are shown with a beige background. For additional commands in a particular cell's context, use the cell's context menu. Note: The name of a cell button's command is displayed as a tool tip when you hover the button.

 

icOptimalWidths

Optimizes widths of grid columns according to cell content.

ic_jsongridmakelist / ic_jsongridmaketable

When colored, Table Display is on, otherwise off. Click to switch the display

ic_jsongridrowcols / ic_jsongridcolrows

A toggle command in top left cell of table. Switches rows to columns and vice versa

ic_jsongridfilteroff / ic_jsongridfilteron

When colored, a filter for the table, object, or array is active, otherwise the filter s deactivated. Click to deactivate/activate. To edit the expression, double-click it

ic_xmlgridviewwordwrap

Toggle command to word-wrap cells. When selected, word-wrap is on. By default. only the contents of items are wrapped. If you want to additionally wrap the names of items, choose this option from the icon's dropdown list.

ic_jsongridappendrow

In an array: Append an array item to the list or table

In an object: Append a key:value pair (as a row in a list, or (in table display) as a cell of a new table column)

ic_jsongridaddtype

Add an empty key:value pair; the type of the value is string by default

ic_jsongridassigntype

Select the datatype of a property value, or enter a comment or formula

 

Note:For a description other toolbar commands, see the section Context Menu in Grid View.

 

 

© 2017-2023 Altova GmbH