JsonTree.js - Documentation - Binding Options

Below is the JSON format and properties that can be used for the binding options.

Download Now

v4.7.0 - 10th Dec 2024
JSON Properties

Standard Options:

Type: Name: Description:
Object, Array, string data States the data that should be used for the tree (defaults to null). This can be an Array, Object, or URL.
string id States the ID to use for the JsonTree.js element (if not set manually for the ID attribute, defaults to "").
string class States the custom classes (split up using spaces) to assign to the JsonTree.js element (defaults to "").
boolean showObjectSizes States if the property/length counts should be shown for Objects/Arrays (defaults to true).
boolean useZeroIndexingForArrays States if the indexes should for arrays should start from zero (defaults to true).
string dateTimeFormat States the display format that should be used for date values (defaults to "{dd}{o} {mmmm} {yyyy} {hh}:{MM}:{ss}", refer to "Date Formats" documentation for formatting).
boolean showExpandIcons States if the expand icons should be shown (defaults to true).
boolean showStringQuotes States if quotes should be shown around string values (defaults to true).
boolean showAllAsClosed States if all the nodes should be closed when first rendered (defaults to false).
boolean sortPropertyNames States if the property names for an object should be sorted (defaults to true).
boolean sortPropertyNamesInAlphabeticalOrder States if the sorted property names for an object should be in alphabetical order (defaults to true).
boolean showCommas States if commas should be shown at the end of each line (defaults to true).
boolean reverseArrayValues States if the values from an array should be shown in reverse order (defaults to false).
boolean addArrayIndexPadding States if the indexes shown for an array should be padded (defaults to false).
boolean showValueColors States if the colors for the values should be shown (defaults to true).
boolean fileDroppingEnabled States if JSON files can be dropped onto the main display and shown (defaults to true).
number jsonIndentSpaces States the total spaces that should be used for the indentation in any JSON (defaults to 8).
boolean showArrayIndexBrackets States if the array index brackets should be shown (defaults to true).
boolean showOpeningClosingCurlyBraces States if opening/closing curly braces should be shown (defaults to false).
boolean showOpeningClosingSquaredBrackets States if opening/closing curly brackets should be shown (defaults to false).
boolean includeTimeZoneInDates States if editing a date/time should include the timezone information (defaults to true).
boolean openInFullScreenMode States if the UI should be shown in full-screen mode (defaults to false).
object valueToolTips States the tooltips to use for specific property paths (for example, "value1\value2").
number editingValueClickDelay States how long an editable value should wait after being clicked to trigger the custom event (in milliseconds, defaults to 500).
boolean showDataTypes States if the type of each object should be shown in the display (defaults to false).
boolean logJsonValueToolTipPaths States if the JSON value tooltips paths should be logged to the console (defaults to false).
string exportFilenameFormat States the export filename format (defaults to "JsonTree_{dd}-{mm}-{yyyy}_{hh}-{MM}-{ss}.json").
boolean showPropertyNameQuotes States if speech marks should be shown around the property names (defaults to true).
boolean showOpenedObjectArrayBorders States if the object/array contents should show the opened borders (defaults to true).
boolean showPropertyNameAndIndexColors States if the object/array names/index should show the parent's color (defaults to true).
boolean showUrlOpenButtons States if a URL can be opened in a new window (defaults to true).
boolean showEmailOpenButtons States if an Email can be opened in the default email editor (defaults to true).
number minimumArrayIndexPadding States the minimum number of padding zeros that should be used on array indexes (defaults to 0)
string arrayIndexPaddingCharacter States the padding character that should be used for array indexes (defaults to "0").
boolean showCssStylesForHtmlObjects States if the CSS styles should be shown for an HTML object (defaults to false).
string jsonPathAny States the characters that should be used to define an "any" path (defaults to "..").
string jsonPathSeparator States the separator to use for JSON paths (defaults to "\").
boolean showChildIndexes States if the child array/set indexes should be shown (defaults to true).
boolean showClosedArraySquaredBrackets States if the closed squared symbols ([ ... ] text) should be shown (defaults to true).
boolean showClosedObjectCurlyBraces States if the closed curly braces ({ ... } text) should be shown (defaults to true).
boolean convertClickedValuesToString States if the values click (when an event is assigned) should be converted to strings (defaults to false).
string rootName States the default name to use for an object/array root (if array paging is disabled, defaults to "root").
string emptyStringValue States the display value to use for empty strings (defaults to "").
string expandIconType States the expand icon type to use (supports "arrow", "square", "circle", and "plus-minus", defaults to "root").
boolean openUrlsInSameWindow States if a URL should be opened in the same window (defaults to false).
Object title See Title Options.
Object footer See Footer Options.
Object controlPanel See Control Panel Options.
Object sideMenu See Side Menu Options.
Object allowEditing See Ignore Options.
Object tooltip See ToolTip Options.
Object parse See Parsing Options.
Object allowEditing See Allow Editing Options.
Object autoClose See Auto-Close Options.
Object paging See Paging Options.
Object lineNumbers See Line Number Options.
Object maximum See Maximum Options.

Title Options:

Category: Type: Name: Description:
title string text The text that should be displayed for the "JsonTree.js" title bar label.
title boolean showCloseOpenAllButtons States if the open/close all buttons should be shown in the title bar (defaults to true).
title boolean showCopyButton States if the copy all button should be shown in the title bar (defaults to true).
title boolean enableFullScreenToggling States if full-screen toggling is enabled (double-clicking the title bar, defaults to true).
title boolean showFullScreenButton States if the toggle full-screen button should be shown in the title bar (defaults to true).
Category: Type: Name: Description:
footer boolean enabled States if the footer bar should be shown (in full-screen mode, defaults to true).
footer boolean showDataTypes States if the footer bar should show the value data types (defaults to true).
footer boolean showLengths States if the footer bar should show the key/value length (defaults to true).
footer boolean showSizes States if the footer bar should show the key/value sizes (defaults to true).
footer boolean showPageOf States if the footer bar should show the "Page x of y" text (defaults to true).
footer number statusResetDelay States how long the status notification text should be visible for (defaults to 5000 milliseconds).

Control Panel Options:

Category: Type: Name: Description:
controlPanel boolean enabled States if the panel is enabled (defaults to true).
controlPanel boolean showCopyButton States if the copy button should be visible (defaults to true).
controlPanel boolean showMovingButtons States if the moving buttons should be visible (defaults to true).
controlPanel boolean showRemoveButton States if the remove button should be visible (defaults to false).
controlPanel boolean showEditButton States if the edit button should be visible (defaults to true).
controlPanel boolean showCloseOpenAllButtons States if the open/close all buttons should be visible (defaults to true).
controlPanel boolean showSwitchToPagesButton States if the switch to pages buttons should be visible (defaults to true).
controlPanel boolean showImportButton States if the import button should be visible (defaults to true).
controlPanel boolean showExportButton States if the export button should be visible (defaults to true).
controlPanel boolean showOpenCloseButton States if the open/close button should be visible (defaults to true).

Side Menu Options:

Category: Type: Name: Description:
sideMenu boolean enabled States if the side menu should be shown (defaults to true).
sideMenu boolean showImportButton States if the import button is shown (defaults to true).
sideMenu boolean showExportButton States if the export button is shown (defaults to true).
sideMenu string titleText States the side menu title bar text to use (defaults to binding option value "title.text").
sideMenu boolean showAvailableDataTypeCounts States if the total count for each data item on display next to the checkbox text (defaults to true).
sideMenu boolean showOnlyDataTypesAvailable States that only the data types on display should be shown as filter checkboxes (defaults to false).
sideMenu boolean showClearJsonButton States if the clear JSON button is shown (defaults to true).
sideMenu number updateDisplayDelay States the delay that should be used before updating the UI (when something has changed, defaults to 500 milliseconds).

Ignore Options:

Category: Type: Name: Description:
ignore boolean nullValues States if NULL values should be ignored and not rendered (defaults to false).
ignore boolean functionValues States if FUNCTION values should be ignored and not rendered (defaults to false).
ignore boolean unknownValues States if UNKNOWN values should be ignored and not rendered (defaults to false).
ignore boolean booleanValues States if BOOLEAN values should be ignored and not rendered (defaults to false).
ignore boolean decimalValues States if DECIMAL values should be ignored and not rendered (defaults to false).
ignore boolean numberValues States if NUMBER values should be ignored and not rendered (defaults to false).
ignore boolean stringValues States if STRING values should be ignored and not rendered (defaults to false).
ignore boolean dateValues States if DATE values should be ignored and not rendered (defaults to false).
ignore boolean objectValues States if OBJECT values should be ignored and not rendered (defaults to false).
ignore boolean arrayValues States if ARRAY values should be ignored and not rendered (defaults to false).
ignore boolean bigIntValues States if BIGINT values should be ignored and not rendered (defaults to false).
ignore boolean symbolValues States if SYMBOL values should be ignored and not rendered (defaults to false).
ignore boolean emptyObjects States if empty OBJECTS should be ignored and not rendered (defaults to false).
ignore boolean guidValues States if GUID values should be ignored and not rendered (defaults to false).
ignore boolean colorValues States if COLOR values should be ignored and not rendered (defaults to false).
ignore boolean regExpValues States if REGEXP values should be ignored and not rendered (defaults to false).
ignore boolean mapValues States if MAP values should be ignored and not rendered (defaults to false).
ignore boolean setValues States if SET values should be ignored and not rendered (defaults to false).
ignore boolean urlValues States if URL values should be ignored and not rendered (defaults to false).
ignore boolean imageValues States if IMAGE values should be ignored and not rendered (defaults to false).
ignore boolean emailValues States if EMAIL values should be ignored and not rendered (defaults to false).
ignore boolean htmlValues States if HTML values should be ignored and not rendered (defaults to false).
ignore boolean lambdaValues States if LAMBDA values should be ignored and not rendered (defaults to false).

ToolTip Options:

Category: Type: Name: Description:
tooltip number delay States how long to wait before showing a tooltip (in milliseconds, defaults to 750).
tooltip number offset States the additional offset to use for the tooltip position (in pixels, defaults to 0).

Parsing Options:

Category: Type: Name: Description:
parse boolean stringsToDates States if string values should be parsed to Date() objects (if valid, defaults to false).
parse boolean stringsToBooleans States if string values should be parsed to Boolean objects (if valid, defaults to false).
parse boolean stringsToNumbers States if string values should be parsed to Number objects (if valid, defaults to false).
parse boolean stringsToSymbols States if string values should be parsed to Symbol objects (if valid, defaults to false).
parse boolean stringsToFloats States if string values should be parsed to Float objects (if valid, defaults to false).
parse boolean stringsToBigInts States if string values should be parsed to Big Int objects (if valid, defaults to false).

Allow Editing Options:

Category: Type: Name: Description:
allowEditing boolean booleanValues States if BOOLEAN values can be edited (defaults to true).
allowEditing boolean decimalValues States if DECIMAL values can be edited (defaults to true).
allowEditing boolean numberValues States if NUMBER values can be edited (defaults to true).
allowEditing boolean stringValues States if STRING values can be edited (defaults to true).
allowEditing boolean dateValues States if DATE values can be edited (defaults to true).
allowEditing boolean bigIntValues States if BIGINT values can be edited (defaults to true).
allowEditing boolean guidValues States if GUID values can be edited (defaults to true).
allowEditing boolean colorValues States if COLOR values can be edited (defaults to true).
allowEditing boolean propertyNames States if property names can be edited (defaults to true).
allowEditing boolean urlValues States if URL values can be edited (defaults to true).
allowEditing boolean emailValues States if EMAIL values can be edited (defaults to true).
allowEditing boolean regExpValues States if REGEXP values can be edited (defaults to true).
allowEditing boolean symbolValues States if SYMBOL values can be edited (defaults to true).
allowEditing boolean imageValues States if IMAGE values can be edited (defaults to true).
allowEditing boolean bulk States if bulk-editing of the JSON is enabled (defaults to true).

Auto-Close Options:

Category: Type: Name: Description:
autoClose number objectSize States the size an object has to be before it's closed on the first load (defaults to 0).
autoClose number arraySize States the size an array has to be before it's closed on the first load (defaults to 0).
autoClose number mapSize States the size a map has to be before it's closed on the first load (defaults to 0).
autoClose number setSize States the size a set has to be before it's closed on the first load (defaults to 0).
autoClose number htmlSize States the size an HTML object has to be before it's closed on the first load (defaults to 0).

Paging Options:

Category: Type: Name: Description:
paging boolean enabled States if paging is enabled (replaces "showArrayItemsAsSeparateObjects", defaults to false).
paging number columnsPerPage States how page columns (array items) to show for each page (defaults to 1, maximum of 6).
paging number startPage States which page to start on when array paging is enabled (defaults to 1).
paging boolean synchronizeScrolling States if the paging columns should synchronize their scroll positions (defaults to false).
paging boolean allowColumnReordering States if the columns can be reordered when editing is enabled (defaults to true).
paging boolean allowComparisons States if side-by-side property name comparisons can be shown in the display (defaults to false).

Line Number Options:

Category: Type: Name: Description:
lineNumbers boolean enabled States if the line numbers are enabled (defaults to false).
lineNumbers boolean padNumbers States if line numbers should be padded (defaults to false).
lineNumbers boolean addDots States if line numbers should show a dot after the number (defaults to true).

Maximum Options:

Category: Type: Name: Description:
maximum number decimalPlaces States how many decimal places should be used for decimal values (defaults to 2).
maximum number stringLength States the maximum length a string can be in the display (defaults to 0, which will use the full length).
maximum number urlLength States the maximum length a URL can be in the display (defaults to 0, which will use the full length).
maximum number emailLength States the maximum length an Email can be in the display (defaults to 0, which will use the full length).
maximum number numberLength States the maximum length a Number can be in the display (defaults to 0, which will use the full length).
maximum number bigIntLength States the maximum length an Big Int can be in the display (defaults to 0, which will use the full length).
maximum number inspectionLevels States the maximum number of inspection levels that can be shown (helps performance, defaults to 10).
maximum number propertyNameLength States the maximum length a property name can be in the display (defaults to 0, which will use the full length).
maximum number functionLength States the maximum length a Function can be in the display (defaults to 0, which will use the full length).
maximum number lambdaLength States the maximum length a Lambda can be in the display (defaults to 0, which will use the full length).