Open a file
On the home screen, tap Open a file and pick it in Android's file picker. Or start from another app: tap a .json or .txt file in your file manager, mail or cloud app and pick Neat Nest. When Android asks, tap Always to open such files in Neat Nest every time. If another app already opens JSON files, the home screen names it and has a button to its app info, where Open by default, Clear defaults sets it free.
You can also Share a file or some text to Neat Nest, and select JSON in any app and pick Open in Neat Nest from the menu that appears. New JSON, New text and Paste start a document without a file.
Saving
Everything you type is kept on the phone as you type. The line under the name says whether the file has it yet: Saved, or Changes not saved. Tap the save button to write back to the same file. Save as in the menu writes a copy wherever you pick. A document that came without a file asks where to save the first time. Close this document in the menu, or on the home screen, removes it from Neat Nest; your file stays where it is.
The Text view
- Line numbers and colours
- Keys, strings, numbers and true, false and null each have a colour. Turn colours or line numbers off in Settings.
- Status bar
- Valid JSON, or the line and column of the first error with what is wrong. Tap an error to jump to it. Below it, the path of the value under the cursor, like
$.orders[3].total, with a copy button. - Key row
- Over the keyboard: undo, redo, { } [ ] : , " and Tab.
- Wrap
- The wrap button folds long lines to the screen. Turn it off and each line stays one line, and the text scrolls sideways as well as up and down.
- Find and replace
- The search button opens find and replace, with Previous, Next, Replace and All.
- Format, Compact, Sort keys
- Format indents with 2 spaces (or 4, in Settings), Compact removes the spaces, Sort keys orders every object's keys. They work from any view. Numbers keep their exact digits.
The Tree view
Tap an object or array to open or close it. Tap a value, or the three dots on any row, for Edit value, Copy value, Copy path and Delete. Typed values keep their type: 42 is a number, true a boolean, null null, anything else text. Expand all and Collapse all are in the toolbar. Arrays show 200 items at a time, with Show more at the end. A tree edit writes the whole file back formatted.
The Table view
An array of objects, or an object that holds one, becomes a table. Nested keys become dotted columns like customer.city. Tap a column header to sort it up, again for down, again to go back. Tap a cell to see all of it and copy it. Tables show the first 1,000 rows.
JSONPath filter
In the Tree and Table views, type a query in the filter box:
- $.store.book[0].title
- names and indexes; the leading $ is optional
- items[-1] and items[1:3]
- from the end, and slices
- $.a[*] and $..id
- every child, and every id at any depth
- users[?(@.age >= 18)]
- filters with == != < <= > >=, =~ /regex/i, &&, || and !
Tap a match for Show in the tree, Copy value and Copy path. In the Table view the matches become the rows.
Compare
Tap the compare button at the top and pick the second JSON: a file, the clipboard, or another open document. The Tree view then shows both. Key order and formatting do not count; array items are lined up by value. Changed values are marked with a tilde, added with a plus, removed with a minus, each with its own colour. The counts at the top list them; tap one to see where. The arrows step through every difference. Swap puts the sides the other way round. On a tablet or in landscape the sides sit next to each other.
Big files
Neat Nest opens files up to 20 MB. Up to about 800 KB the Text view edits everything. Past that, the Text view reads the file and scrolls it smoothly (drag the right edge to move fast), and you change values in the Tree view or with Format, Sort keys and Replace all.
Widgets and shortcuts
Two widgets: Quick actions (Open, New, Paste, Compare) and Recent files. Add them from the home screen's widget list, or from the buttons on Neat Nest's home screen. Touch and hold the app icon for the same shortcuts.
Settings
Theme (follow the phone, light, dark or black), text size, indent, wrap, line numbers, colours, the key row, and a reading font for plain text files. Neat Nest follows Android's own font size up to 200 percent and works with TalkBack.