JsonTree.js - Documentation - Recent Changes

Below is a list of the most recent changes made in the JsonTree.js versions released.

Download Now

v0.8.0 - 20th Mar 2024
Versions

Version 0.8.0:

Configuration Options:

  • Added new configuration option "objectErrorText", which states the error text that should be shown when an object error is detected (defaults to "Errors in object: {{error_1}}, {{error_2}}").
  • Added a new configuration option called "attributeNotValidErrorText", which states the error text that should be shown when a binding object isn't valid (defaults to "The attribute '{{attribute_name}}' is not a valid object.").
  • Added a new configuration option called "attributeNotSetErrorText", which states the error text that should be shown when a binding attribute isn't set (defaults to "The attribute '{{attribute_name}}' has not been set correctly.").

Fixes & Improvements:

  • Added "use strict" support internally and updated all public functions to use the new scope.


Version 0.7.0:

New Features:

  • Added custom value rendering support! This allows custom triggers to be used to render the values for specific types how you choose!

Binding Options:

  • Added a new binding option called "ignoreUnknownValues", which states if UNKNOWN values should be ignored and not rendered (defaults to false).

Binding Options - Custom Triggers:

  • Added a new binding option custom trigger called "onBooleanRender", which states an event that should be triggered when a boolean value is rendered.
  • Added a new binding option custom trigger called "onDecimalRender", which states an event that should be triggered when a decimal value is rendered.
  • Added a new binding option custom trigger called "onNumberRender", which states an event that should be triggered when a number value is rendered.
  • Added a new binding option custom trigger called "onStringRender", which states an event that should be triggered when a string value is rendered.
  • Added a new binding option custom trigger called "onDateRender", which states an event that should be triggered when a date value is rendered.
  • Added a new binding option custom trigger called "onFunctionRender", which states an event that should be triggered when a function value is rendered.
  • Added a new binding option custom trigger called "onNullRender", which states an event that should be triggered when a null value is rendered.
  • Added a new binding option custom trigger called "onUnknownRender", which states an event that should be triggered when an unknown value is rendered.

Fixes & Improvements:

  • Internal code cleanups to make things easier to read.
  • Fixed the CSS class "unknown" having a hover effect.


Version 0.6.0:

Binding Options:

  • Added a new binding option called "maximumDecimalPlaces", which states how many decimal places should be used for decimal values (defaults to 2).

Fixes & Improvements:

  • Fixed a minor formatting issue in the "package.json" file.
  • Fixed a fault that prevented the date formatter "{dd}" from showing a padded number.


Version 0.5.1:

  • Fixed the README files containing invalid characters.
  • Fixed the spacing around the Object/Array nodes.


Version 0.5.0:

Binding Options - Custom Triggers:

  • Added a new binding option custom trigger called "onDestroy", which states an event that should be triggered when an element is destroyed.

Public Functions:

  • Added a new public function "openAll()", which will open all the nodes for a specific DOM element.
  • Added a new public function "closeAll()", which will close all the nodes for a specific DOM element.
  • Added a new public function "destroy()", which will revert a rendered DOM element to its original state.
  • Added a new public function "destroyAll()", which will revert all rendered DOM elements to their original state.
  • Added a new public function "getIds()", which will return all the IDs for the elements that have been rendered.


Version 0.4.0:

Binding Options:

  • Added a new binding option called "showTitleCopyButton", which states if the copy all button should be shown in the title bar (defaults to false).
  • Added a new binding option called "showValueColors", which states if the colors for the values should be shown (defaults to true).

Binding Options - Custom Triggers:

  • Added a new binding option custom trigger called "onCopyAll", which states an event that should be triggered when the JSON is copied to the clipboard.
  • Added a new binding option custom trigger called "onOpenAll", which states an event that should be triggered when all the JSON nodes are opened.
  • Added a new binding option custom trigger called "onCloseAll", which states an event that should be triggered when all the JSON nodes are closed.

Configuration Options:

  • Added a new binding option called "copyAllButtonText", which states the text that should be shown for the "Copy All" button text.

Fixes:

  • Fixed the font being overridden for the display.


Version 0.3.0:

Binding Options:

  • Added a new binding option called "ignoreNullValues", which states if NULL values should be ignored and not rendered (defaults to false).
  • Added a new binding option called "ignoreFunctionValues", which states if FUNCTION values should be ignored and not rendered (defaults to false).
  • Added a new binding option called "reverseArrayValues", which states if the values from an array should be shown in reverse order (defaults to false).
  • Added a new binding option called "addArrayIndexPadding", which states if the indexes shown for an array should be padded (defaults to false).
  • Updated the default value for the binding option "dateTimeFormat" to "{dd}/{mm}/{yyyy} {hh}:{MM}:{ss}".

Binding Options - Custom Triggers:

  • Added a new binding option custom trigger called "onRefresh", which states an event that should be triggered when a rendered element is refreshed.

Public Functions:

  • Added a new public function "refresh()", which refreshes the UI for a specific element.
  • Added a new public function "refreshAll()", which will refresh all the rendered elements.

UI Improvements:

  • Added "unknown" property type support! This will use a new CSS class called "unknown".
  • Added "decimal" property type support! This will use a new CSS class called "decimal".

General Improvements:

  • All data is now tracked internally, allowing for future improvements.

Documentation:

  • Fixed the badge links in the README files pointing to the wrong project.


Version 0.2.0:

Binding Options:

  • Added a new binding option called "sortPropertyNamesInAlphabeticalOrder", which states if the sorted property names for an object should be in alphabetical order (defaults to true).
  • Added a new binding option called "showCommas", which states if commas should be shown at the end of each line (defaults to false).

Public Functions:

  • Added new public function "render()", which will render a specific DOM element using the options you specify.
  • Added new public function "renderAll()", which will find all new DOM elements with the "data-jsontree-options" attribute and render them.

UI Improvements:

  • The spacing used for the title bar buttons is now smaller when viewed on a mobile.

Documentation:

  • Fixed some spelling and grammar mistakes in the documentation.
  • Minor improvements to the documentation layout.


Version 0.1.0:

  • Everything :)