Skip to content

NDJSON and Text views

An NDJSON file holds one JSON value per line, such as one log event per line. JSON Digger opens it as a list of records that every view understands: the Tree, Table, and Chart views treat the records as the elements of one array. The NDJSON view shows the same file as raw lines.

A plain text file opens in the Text view. See Supported formats for how JSON Digger tells NDJSON and text apart.

An NDJSON file opens in the Tree view. The top row is the list of records, shown as [N] where N is the number of records, and it is already expanded. Each record below it is a row without a key, shown like any JSON value: {N} for an object, which you can expand.

Blank lines are not records. A line that is not one valid JSON value is still a record: it shows an invalid line badge followed by the line’s text. The status bar counts the records and, separately, the invalid lines.

The tree lists the first 4,096 records. The other records are still searched, queried, and shown in the Table view; when you go to one of them, for example from a search result, it opens in the NDJSON view at its line.

Queries treat the records as rows: jq runs once per record, and SQL sees one row per line. See SQL queries and jq playground.

Select NDJSON in the view switcher to see the file as lines, with line numbers. This view shows the text exactly as it is in the file, including invalid lines.

Click a line, or press Enter on it, to show its record in the Tree view. A blank line has no record. A record past the first 4,096 stays in the NDJSON view, because the tree does not list it.

Very long lines are cut short and end with “… [line truncated]”.

Plain text files, such as .txt and .log files, open in the Text view: the file’s lines with line numbers. JSON Digger reads the lines from the file as you scroll, so a log of any size opens without being loaded into memory.

To wrap long lines, turn on Word wrap in the bar above the text. A wrapped line shows at most 5 lines of text; the rest is hidden. Very long lines are cut short and end with “… [line truncated]”.

Search scrolls to the line of each match, and Ctrl+G goes to a line number; see Go to a line.