Anomalies and lint
The Anomalies panel checks data for problems that are easy to miss when you browse it. Document analysis looks at an array of objects, such as API records, for fields that are missing in some objects or hold different types. Document lint checks the whole file for duplicate keys and for numbers that other programs would read differently.
Select Anomalies on the activity rail, on the right of the window, to open the panel.
Document analysis
Section titled “Document analysis”-
In the tree, select the array to check. To check the root array of a JSON file, or the records of an NDJSON file, select nothing.
-
Open the Anomalies panel, or select Refresh if it is already open.
The panel reports how many objects it analyzed and how many fields have anomalies, then lists the fields, the fields with anomalies first. Each field shows the share of objects that have it and its badges:
- missing: the number of objects without the field.
- mixed: the field holds values of different types, for example numbers in most objects and strings in a few.
nullcounts as a type.
Click a field to see how many values of each type it has, how many are null, and examples of unexpected values. In the Tree view, click an example to select it in the tree.
Duplicate Keys lists objects in the array that have the same key twice; in the Tree view, click one to select the object.
The analysis reads the first objects of a long array; see Limits. Select Refresh after you select another array or change the document.
Document lint
Section titled “Document lint”Lint checks a JSON or NDJSON file for values that other programs may read differently from what the file says:
| Warning | Example | Why it matters |
|---|---|---|
| Duplicate keys | {"id": 1, "id": 2} |
Programs disagree on which value wins; most keep the last one. |
| Integers past 2^53 (rounded by JavaScript) | 9007199254740993 |
JavaScript and other tools that use 64-bit floats round the number. |
| Integers past 64 bits | 18446744073709551616 |
No 64-bit integer type can hold it. |
| Decimals that lose precision | 3.141592653589793238 |
The value read back differs from what the file says. |
| Numbers outside the float range | 1e400 |
The number cannot be read as a 64-bit float. |
Lint runs when you open a file from disk; it does not run on pasted or fetched documents. When it finds something, a notice says how many warnings there are, with a Show button, and the status bar shows the count; click either to open the Anomalies panel.
The Document lint section at the top of the panel lists the warnings by kind, each with its key and the value as other programs read it. In the Tree view, click a warning to select the value. The list shows the first 500 warnings; the counts include all of them.
Lint runs again when the document changes. To run it again yourself, select Refresh in the section.
Lint the whole file
Section titled “Lint the whole file”To keep opening fast, lint checks the first 256 MiB of a file when it opens. When a file is larger, the section says how much it checked, for example “first 256 MiB checked”. Select Lint whole file to check the rest. While lint runs, the button shows its progress; select it to cancel.
To change how much is checked on open, or to turn lint off, set Lint budget (MiB) or Lint on open in Preferences.