Tree View & Querying
Tree View
The tree view is Forja’s default display mode. It renders JSON as a collapsible, interactive tree with syntax highlighting.
Navigation
- Breadcrumbs — As you select nodes, a breadcrumb bar shows the full path. Click any segment to jump to that level.
- Depth indicator — The toolbar shows the current depth and total node count.
- Indent guides — Vertical lines help you track nesting depth in complex structures.
Virtual Scrolling
Forja uses virtual scrolling to handle large JSON files efficiently. Only the visible portion of the tree is rendered, so performance stays consistent whether your file has 100 nodes or 100,000.
Large Files
For files over 10MB, Forja offers three loading options:
- Load full — Parse and render the entire file (may be slow for very large files)
- Load collapsed — Parse the file but start with all nodes collapsed
- Raw view — Show the formatted JSON as plain text with syntax highlighting
Search
Press Cmd+F (macOS) or Ctrl+F (Windows/Linux) to open the search bar.
- Search matches across all keys and values
- Matching nodes are highlighted inline
- Use the up/down arrows (or
Enter/Shift+Enter) to navigate between matches - Ancestor nodes expand automatically when navigating to a match
Raw View
Toggle between tree view and raw view using the view mode button in the toolbar. The raw view shows the full JSON with CodeMirror-powered syntax highlighting — useful for copying large sections or reading the structure as formatted text.
JSONata Querying
Forja includes a built-in JSONata query engine for filtering and transforming JSON data.
Opening the Query Panel
Click the query icon in the toolbar to open the query panel. This splits the view into two panes: your original JSON on the left and query results on the right.
Writing Queries
Type a JSONata expression in the query input. Results update in real-time as you type. For example:
| Expression | Description |
|---|---|
name | Extract the name field |
users[age > 30] | Filter users older than 30 |
items.(title & " - " & price) | Transform items into formatted strings |
$sum(orders.total) | Sum all order totals |
**[type="error"] | Find all nodes with type equal to "error" at any depth |
Queries have a 5-second timeout to prevent the browser from locking up on expensive operations.
Query Bookmarks
Save frequently used expressions by bookmarking them. Bookmarked queries are persisted across sessions and accessible from the query panel dropdown.
Lossless Big Numbers
JavaScript’s Number type silently rounds integers outside the safe range (±9,007,199,254,740,991). Forja preserves the exact digits sent by the server using lossless parsing.
This matters for:
- Database IDs — 64-bit integer IDs like
9223372036854775807stay intact - Financial data — Precise decimal values aren’t rounded
- Timestamps — Nanosecond-precision timestamps remain accurate