Please enable JavaScript to view this site.

Altova XMLSpy 2020 Professional Edition

Editing content in JSON Grid View is straightforward: Double-click inside the cell to be edited and edit the content as required. Additionally, JSON Grid View offers the following editing features:

 

Type selection functionality, as well as automatic type detection and conversion of values

Auto-completion in JSON documents that are based on a JSON schema

 

Type selection and automatic detection of types

JSON Grid View distinguishes between the following type categories:

 

Simple types: String, Number, Boolean, Null

Special simple types: Auto (which is detected from the value), Comment (JSONC, JSON5)

Container types: Object, Array

Special container types: Formula

 

The type of a value is indicated by a symbol in front of the value (see screenshot below). To change a type, click its symbol and select the type you want from the menu that appears. The symbols and shortcuts of types are shown in the screenshot below:

JSONGridViewTypeSelection

Auto-detected types have green dots under them (see screenshot below). An explicit type is a type that you assign.

JSONGridViewAutoTypeD

Type-related actions occur in two situations:

 

When a JSON document is loaded: All simple types are converted to Auto, which are automatically detected from the values. For example "MyString" is automatically detected as a String type, 123 as a Number type, true as a Boolean type, and null as a Null type. In cases of ambiguous strings, select the type explicitly.

When a new data structure or value is entered: Simple types are auto-detected and the type is automatically assigned. You can change the type subsequently if you want to.

 

Note:The JSON Grid View options enable you to specify (i) how type changes are to be handled when multiple cells are selected, and (ii) how values of atomic types should be treated when the type is changed to an array or object.

 

Auto-completion

Auto-completion is enabled when the JSON document (JSON instance/schema) being edited is associated with a schema.

 

If the document is a JSON schema, then auto-completion is based on the schema version indicated by the $schema keyword. For more information, see also JSON Schema Version.  

If the document is a JSON/JSON5 instance, then a JSON schema must be assigned to the instance in order for auto-completion to be enabled.

 

Auto-completion provides you with the available entry options at the cursor location. It does this (i) via pop-ups in the main window, and (ii) via the entry helpers (see screenshot below). The pop-ups and entry helpers each display a list of entries that are valid at that cursor location. To move through the entries in the pop-up list, use the arrow keys. Select an entry from the pop-up window or double-click an entry in the entry helper to insert it.

JSONGridViewAutoComplete

 

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.

 

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_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

 

 

© 2019 Altova GmbH