{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "json-viewer-demo",
  "title": "JSON Viewer Demo",
  "description": "A worked example of JSON Viewer: A collapsible tree for a JSON payload, navigable from the keyboard, where every row can hand you its path.",
  "registryDependencies": [
    "https://ui.tinkererslabs.com/r/json-viewer.json"
  ],
  "files": [
    {
      "path": "components/demos/json-viewer-demo.tsx",
      "content": "\"use client\"\n\nimport { JsonViewer } from \"@/registry/default/json-viewer/json-viewer\"\n\nconst response = {\n  id: \"run_8f21c\",\n  model: \"claude-opus-5\",\n  status: \"completed\",\n  usage: { input: 4182, output: 663, cacheRead: 3900 },\n  tools: [\n    {\n      name: \"search_contracts\",\n      ok: true,\n      duration: 412,\n      input: { query: \"renewal window\", limit: 3 },\n      output: {\n        matches: [\n          { id: \"acme-msa\", score: 0.94, page: 12 },\n          { id: \"northwind-sow\", score: 0.71, page: 4 },\n        ],\n      },\n    },\n    {\n      name: \"summarise\",\n      ok: false,\n      duration: 1180,\n      error: \"The document had no extractable text layer.\",\n    },\n  ],\n  citations: [],\n  finishedAt: \"2026-08-25T09:14:02Z\",\n}\n\nexport function JsonViewerDemo() {\n  return (\n    <JsonViewer\n      className=\"w-full max-w-xl\"\n      value={response}\n      rootName=\"response\"\n      defaultExpandedDepth={2}\n    />\n  )\n}\n",
      "type": "registry:example"
    }
  ],
  "type": "registry:example"
}