Please enable JavaScript to view this site.

Altova XMLSpy 2020 Professional Edition

The JSON: Pretty Printing section (screenshot below) enables you to define options for the pretty-printing of JSON documents in Text View. A JSON document will be reformatted with the pretty-printing settings you specify here when the Edit | Pretty-Print command is executed.

OptionsJSONPrettyPrinting

Pretty-printing is intended to provide a formatting that makes it easier for you to see the structure of the document. You can select options for a few key settings, which are described below. For every option you select, the resulting formatting is shown immediately in the preview.

 

Inline Array: Displays the items of an array in a single line (or inline). Otherwise the items might be on separate lines. You can choose to never apply inline formatting to arrays, or to apply inline formatting to empty arrays or arrays up to a specific size.

Inline Object: Displays the properties of an object in a single line (or inline). Otherwise the properties might be on separate lines. You can choose to never apply inline formatting to objects, or to apply inline formatting to empty objects or objects that have up to a specified number of properties.

Inline Padding: If selected, adds space between the elements of non-empty inline arrays and non-empty inline objects. The option is enabled only if either the non-empty inline array or non-empty inline object option has been selected.

Inline Padding Empty: If selected, adds space inside the delimiters of empty inline arrays and empty inline objects. The option is enabled if either an array or object is set to be inline (empty or non-empty).

Single Quoted Strings (JSON5): If selected, converts all quotes in JSON5 documents to single quotes.

Unquoted Strings (JSON5): If selected, removes, in JSON5 documents, quotes from around all keys (of key:value pairs).

 

Save and exit

After making the settings, click OK to finish.

 

© 2020 Altova GmbH