JSON tree — version history
A JSON document displayed as in a code editor: line numbers, colouring by type, folding of every block, search. Introduced in 3.0.
4.0 — October 2026 #
New #
of_expand_path(as_path)andof_collapse_path(as_path)open or fold one block by its path (-5on an unknown path or a leaf),of_is_expanded(as_path)reads its state, andue_node_toggled(as_path, ab_expanded)reports a fold opened or closed — by the user or by these two methods.of_copy()copies the selection, and so does Ctrl+C in the tree (without a selection, Ctrl+C stays a window shortcut).of_selected_text()returns the decoded value of the selected leaf (a string without quotes or escapes);of_has_selection()tells the root (whose path is"") apart from "nothing selected".- Large documents: only the lines around the visible area are drawn — an arrow key on a 288 KB document is instant (it took about 3 seconds); a document of more than 1,500,000 lines is refused with a message in the tree and
ue_errorinstead of being shown with its end out of reach. - Given the focus (
of_focus_webview, the Tab key), the tree takes the keyboard; F3 and Shift+F3 go to the next or previous match; Right arrow opens a folded block or enters an open one. - The search bar and the
ue_errormessage are entirely in the display language, line and column included (do not compare their text); the search bar's buttons are named for screen readers, and the tree exposes its selection to them. - Printing or capturing the tree renders the document itself (up to 10,000 lines), not just the visible window.
- Search options, like the code editor:
ib_find_match_casefinds only the text with the same case,ib_find_whole_wordfinds it only as a whole word (idis no longer found insideuser_id); the search box (Ctrl+F) has the matching Aa and ab toggles, and a change of option runs the search again. Both are off by default: the search stays as it was.
Fixed #
- Numbers and keys are shown as received:
12345678901234567890is no longer shown12345678901234567000,1.10stays1.10, and the first of two identical keys is no longer lost. is_jsonreads back as it was set (it came back compacted, and empty after an invalid JSON);is_json = ""empties the tree without raisingue_error, as documented.of_clearempties the tree only; it no longer resetsib_wrapandib_search_enabled(that isof_reset's job).- A key named
constructor,toString,__proto__… no longer breaks folding and selection; two nodes reached by similar paths no longer fold together, and an empty key no longer folds everything. of_match_countandal_countofue_search_resultcount occurrences, not lines: one match is current at a time andof_search_nextmoves between the matches of a line.- A search opens only the blocks hiding the current match (searching "e" opened the whole document), and
of_clear_searchrestores the folds from before the search; a search no longer folds away or moves the selected line. of_search("")closes the search bar; a new document re-runs the search in progress instead of leaving the old count on screen; case-insensitive matching is exact for every alphabet.of_select_pathopens the blocks hiding the line; folding the block that contains the selection moves the selection onto that block (andue_selection_changedsays so for a user gesture) instead of losing it.- Keyboard: closing lines (
},]) are skipped by the arrows, and a click on one selects its block without scrolling the view; Right arrow on a leaf no longer moves down a line; Esc in the search bar closes it and gives the focus back to the tree. - Enter on a leaf raises
ue_node_clickedlike a click and is kept by the tree (it pressed the window's default button); Esc with the search bar open closes the bar first (it pressed the window's Cancel button). - Dark themes: search highlights are readable, the current match stands out on the selected line, scrollbars are dark, and the keyboard focus is visible.
- With
ib_wrap, scrolling up no longer makes the view jump. - A JSON document always reads left to right, even in a right-to-left application (the search bar follows the application).
- Reading back a long text value takes time proportional to its size and returns it whole (it slowed down with the size and was cut beyond a million characters).
- Enter or Esc pressed in the component, when it does not use them, goes back to the window: the PowerBuilder
DefaultorCancelCommandButtonfires (the key was lost). - A language set by
PBT_SetLanguageapplies from the very next order given to the component: a text of an event raised by that order no longer comes in the old language. - With no language chosen by the application, the component announces English to screen readers (it announced French).
is_theme_style,is_theme_modeandil_theme_accentread back the style and mode shown and the component's own accent (-1when it has none); an unknown or badly written value is ignored instead of leaving the component without a theme, and an axis left empty follows the application's theme.- The application accent (
PBT_SetDefaultThemeAccent) survives a change of theme, is followed as long as the component has no accent of its own, and repaints everything derived from it (hover, pressed, selections); Windows high contrast is supported.
Behavior changes #
- The path of a node (
ue_node_clicked,ue_selection_changed,of_selected_path,of_select_path) is the path ofn_pbt_json: levels joined by/, array indexes from 1 (lines/1/sku, it waslines.0.sku),""for the root — pass it as is ton_pbt_json.of_get_stringon the same text. of_select_pathon an unknown path returns-5and the selection does not move (it returned0).- A closing line is no longer selected:
ue_selection_changedno longer reports it. - See the 3 → 4 migration guide, sections 11.3, 11.5, 11.6, 11.29 and 11.42.
3.0 — September 2026 #
New #
- First release:
is_jsonshows a document as in a code editor — pretty-printed, one line per token, line numbers, colouring by type (keys, strings, numbers, booleans, null) in a palette for light themes and one for dark themes, a fold marker on every object and array. - Folding: by the marker,
of_expand_all,of_collapse_all,of_expand_to_level(n). - Selection:
of_select_path,of_selected_path,of_selected_value, withue_node_clickedandue_selection_changed. - Search: a Ctrl+F bar (
ib_search_enabled),of_search,of_search_next,of_search_prev,of_clear_search,of_match_count,of_match_indexandue_search_result. ib_wrapfor long lines,of_clear, andue_errorfor an invalid document.ue_script_error: a script error in the page reaches PowerBuilder with its message instead of being lost.of_set_property,of_get_propertyandof_component_name: drive a property by its name (settings screen, saved configuration).