jsonb_explorer
jsonb_explorer · Inspect jsonb trees and paths
Overview
| ID | Extension | Package | Version | Category | License | Language |
|---|---|---|---|---|---|---|
| 100596 | jsonb_explorer | jsonb_explorer | 1.0 | FUNC | Unknown | C |
Usage
Sources:
jsonb_explorer is a small C extension that renders a JSONB document as an indented text tree. Version 1.0 exposes only two functions, and one has a source-level return-type defect; use the working tree renderer only in disposable inspection sessions.
Core Workflow
Install the extension and render a document with jsonb_tree(jsonb):
The result is presentation text containing tree-drawing characters, keys, scalar values, and array-size annotations. It is intended for human inspection, not for stable machine parsing.
Important Objects
jsonb_tree(jsonb)returns the formatted tree astextand rejects NULL input because the function is declared strict.jsonb_paths(jsonb)is declared to returntext[][], but the C implementation constructs and returns a singletextdatum. That ABI/type mismatch makes the function unsafe to call.
Operational Caveats
Do not call jsonb_paths(jsonb) unless a maintained downstream build has corrected both the SQL declaration and implementation. The repository contains no substantive API documentation or compatibility matrix, and its last reviewed commit is from 2018. The formatter also uses PostgreSQL internal JSONB iterator APIs, so a binary must be rebuilt and tested for the exact PostgreSQL major version. Prefer built-in JSONB operators, jsonb_each, jsonb_array_elements, or a maintained client-side formatter for application logic.