granite-json-tree-viewer demo

Basic demo

Click on a label or on to expand/collapse (Ctrl/Cmd+click: recursively), Alt+click to mark a node, Shift+click to get its JSON-path.

JSON-path (Shift+click on a label):

Styled with CSS custom properties and ::part()

Sorted keys (sort-keys)

XSS test: HTML in keys and values is escaped