NDJSON View
NDJSON view shows a file with one JSON record per line, such as an NDJSON or JSON Lines export or a structured log, as one row per record. Expand a row to read the record as formatted JSON. The Schema panel lists the keys the records use, and you can open chosen keys as columns in Table view.
Files that open in NDJSON view
Section titled “Files that open in NDJSON view”- Files with the
.ndjsonor.jsonlextension. - Files with another extension, or none, whose first lines are each a JSON object or array.
A .json file opens in Text view, even when each line is a JSON record. To read the JSON inside one line there, see JSON in a line. For the full detection rules, see Supported formats.
NDJSON files open in NDJSON view. To switch between NDJSON view and Text view, press Ctrl + J or select NDJSON in the view switcher. Selecting NDJSON while NDJSON view is showing returns to Text view.
The status bar shows the number of lines in the file and the line at the top of the view.
Read the records
Section titled “Read the records”Each row shows the line number and the start of the line as it is written in the file, cut after 120 characters with ....
Click a row to expand it. The record shows below the row as formatted JSON, indented by two spaces per level. Keys, strings, numbers, and the values true, false, and null each have their own colour, taken from the theme. Click the row again to collapse it. Several rows can be expanded at once, and they stay expanded while you scroll.
- Copy JSON copies the formatted record. The button shows Copied.
- Send to scratchpad adds the formatted record to the scratchpad and opens it.
- A long record shows its first 300 lines, then … N more lines (Copy JSON for the full record). Copy JSON and Send to scratchpad use all of it.
- A line that is not valid JSON, or is empty, shows Could not parse this line as JSON.
Move around
Section titled “Move around”Scroll with the mouse, or with Up, Down, Page Up, Page Down, Home, and End. Rows are expanded with the mouse only, and NDJSON view has no active row.
- Search: the search panel works in NDJSON view. Moving to a match scrolls to its row, but the match is not highlighted. See Searching a file.
- Go to line: not available in NDJSON view. Switch to Text view first.
- Bookmarks: they work in Text view and Hex view only. Jumping to a bookmark switches to Text view. See Bookmarks.
The Schema panel
Section titled “The Schema panel”The Schema panel lists every key path in the records, with its types and how often it appears. Open it in one of these ways:
- Press
Ctrl + Shift + J. - Select Schema in the toolbar, in NDJSON view or in a table made from the file.
- Select More actions (
…) → Schema. - Select the Schema icon in the sidebar rail.
Sample or every line
Section titled “Sample or every line”The first time you open the panel for a file, Vaste reads 10,000 lines spread through the file and shows N of M lines sampled. To read every line, select Analyze all lines. The panel shows Analyzing… N% with a Cancel button, and then All N lines analyzed. If you cancel, the panel shows Stopped early: counts cover the lines scanned so far.
What each path shows
Section titled “What each path shows”Each row shows a key path, written with dots for nested keys, such as user.address.city. A nested object is listed as its own path and with each key inside it. An array is listed as one path: Vaste does not list the keys inside arrays.
For each path, the panel shows:
-
Type badges, most common first:
Badge Type AaString 123Whole number .0Number with decimals TFtrueorfalse{}Object []Array ∅null -
A bar with the share of lines that have the path. A
nullvalue counts as present. -
Up to three sample values.
Hover over a row to see the exact counts and the samples. The panel lists up to 10,000 paths and then shows Only the first 10,000 paths are listed. It also counts the lines that are not JSON objects, for example 12 lines are not JSON objects, which includes invalid and empty lines.
Open as a table
Section titled “Open as a table”To read chosen keys as columns:
-
In the Schema panel, select the checkbox of each path you want as a column. All and None select every path or none. The panel shows how many columns are selected.
-
Select Open as table.
Vaste switches to Table view, with one row per line and one column per path, in the order of the panel. Then:
- A missing key or a
nullvalue shows as an empty cell. - An object or array shows as compact JSON text, such as
[1,2]. - A line that is not a JSON object shows as an empty row.
Column types come from the lines the Schema panel read. After a sample, values further down the file can have another type: a number column sorts such values last and leaves them out of its statistics. Select Analyze all lines before you open the table when the types matter.
To change the columns later, change the selection and select Update columns. Vaste shows Table columns updated. Changing the columns clears the table’s filters, sort, and column layout.
Vaste remembers the columns for the file, so the Table button and Ctrl + T work the next time you open it. Until you choose columns, Table view is not available for the file.
What works in an NDJSON table
Section titled “What works in an NDJSON table”Sorting and filtering, column statistics, Record view, and the copy commands work as for a CSV file. The status bar shows NDJSON table with the row position.
The CSV dialect, the header row, and data quality do not apply. SQL queries read every key in the records, not only the columns you chose.
What Vaste keeps and clears
Section titled “What Vaste keeps and clears”- Switching to another view collapses every expanded row.
- Reopening the file with another encoding collapses every expanded row. The chosen columns stay.
- After a reload that rewrote the file, rows already loaded can keep showing their old content. Switch to Text view and back to refresh them.
- Closing the file closes the Schema panel. The chosen columns stay for the next time you open the file.
Next steps
Section titled “Next steps”- Table view: read and move around a table
- SQL queries: group and count records with SQL
- JSON in a line: read the JSON inside one line of a log