Skip to content

Latest commit

 

History

History
29 lines (19 loc) · 1.23 KB

File metadata and controls

29 lines (19 loc) · 1.23 KB
title JSON Tree Viewer
description The collapsible tree that renders Playground output
audience developer

Wiki HomeClient Features

JSON Tree Viewer

JsonTree renders any JSON-safe value from the Playground sandbox as a collapsible tree, DevTools-style, instead of a wall of stringified JSON.

Behavior

  • Recursive — each object/array node is another JsonTree with depth + 1
  • Auto-open depth 1 — the root level starts expanded, everything deeper starts collapsed
  • Primitive styling — strings (quoted), numbers, booleans, and null each get a CSS modifier class for syntax-color output
  • Primitives at the console line level are printed as plain text; only containers get the tree

The values it receives were already sanitized inside the sandbox (functions become ƒ name(), circular references become [Circular], errors become Name: message), so the component can assume plain JSON.

Key files

Related