Paste or fetch JSON
Besides files, JSON Digger opens JSON you copied to the clipboard and JSON returned by a web address. Both open as documents that behave like files: the text is kept exactly as it was received, for the length of your session.
Paste from the clipboard
Section titled “Paste from the clipboard”On the welcome screen, with no tab open, press Ctrl+V. JSON Digger reads the clipboard as JSON and opens it in a new tab named <string>. Each paste opens another tab.
The shortcut works only when no tab is open, so that Ctrl+V keeps pasting into text boxes. To paste while documents are open, close them or save the text to a file.
The clipboard text must be one JSON value: NDJSON pasted this way fails. If the text is not valid JSON, an error notice appears, and it can offer Repair; see Repair malformed JSON. For text over 256 MiB, save it to a file and open the file instead; see Limits.
Fetch from a URL
Section titled “Fetch from a URL”-
Press Ctrl+U, choose File → Fetch from URL…, or select Fetch URL on the welcome screen.
-
Type the address in URL, for example
https://api.example.com/data.json. -
Optional: choose a method other than
GET, and add headers and authentication. -
Select Fetch, or press Ctrl+Enter.
The response opens in a new tab named after the last part of the URL, and a notice shows the HTTP status, the size, and the time the request took. If the request fails, the error appears in the dialog, which stays open.
The dialog has these fields:
| Field | Use |
|---|---|
| Method | GET, POST, PUT, PATCH, DELETE, HEAD, or OPTIONS |
| Body | The request body, for methods other than GET and HEAD. It is sent as is; to send JSON, add a Content-Type: application/json header. |
| Authentication | None, Bearer token, or Basic. See Headers and authentication. |
| Timeout (s) | The time allowed for the whole request, 30 seconds by default |
| Headers | Extra request headers |
| Remember credentials for this URL | Saves the authentication and headers. See Remembered credentials. |
The dialog keeps the values of the last request, so check the method and body before the next fetch.
JSON Digger opens any response whose body is JSON, whatever its HTTP status: a 404 or 500 response with a JSON error body opens like any other, so check the status in the notice. A response that is not JSON fails with the parser’s error. For the largest response JSON Digger accepts, see Limits.
Every fetch opens a new tab. There is no command to fetch a tab’s URL again; fetch it again from Recent files or the dialog.
Paste a cURL command
Section titled “Paste a cURL command”To copy a request from browser developer tools or API documentation, copy it as a cURL command, then select Paste cURL in the dialog. You can also paste the command into the URL field. JSON Digger fills in the URL, method, headers, authentication, body, and timeout.
Commands copied for bash, PowerShell, or the Windows command prompt all work. Options JSON Digger cannot use, such as reading data from a file or multipart form fields, are listed in a warning under the URL field, and options that only affect cURL itself, such as -o or -k, are ignored.
Headers and authentication
Section titled “Headers and authentication”Authentication adds an Authorization header for you:
- Bearer token sends
Authorization: Bearer <token>. - Basic sends the Username and Password as
Authorization: Basic ….
For an API key or any other scheme, add the header yourself under Headers, for example X-API-Key with the key as its value.
Remembered credentials
Section titled “Remembered credentials”Turn on Remember credentials for this URL to save the authentication and every header of the request. They are stored in the system’s credential store (Windows Credential Manager, the macOS Keychain, or the Secret Service on Linux), never in JSON Digger’s own files. The switch is available once the request has authentication or a header.
Credentials are saved for the exact URL, query string included, and only after the fetch succeeds. The method and body are never saved. The next time you type the same URL in the dialog, or fetch it from Recent files, the saved authentication and headers are filled in.
To delete saved credentials, right-click the URL in Recent files and choose Forget Credentials. Selecting Clear list in Preferences → General deletes the credentials of every URL in the list.
Recent URLs
Section titled “Recent URLs”Fetched URLs appear in Recent files on the welcome screen with a globe icon, mixed with files; the list keeps the last 10 entries. Click a URL to fetch it again with GET and its saved credentials. If that fails, the error notice has an Edit URL button that opens the dialog with the URL filled in.
Right-click a URL for more:
| Item | Action |
|---|---|
| Copy URL | Copies the URL |
| Edit URL… | Opens the dialog with the URL and its saved credentials |
| Open in Browser | Opens the URL in your web browser |
| Forget Credentials | Deletes the saved credentials; available when some are saved |
Work with a pasted or fetched document
Section titled “Work with a pasted or fetched document”A pasted or fetched document opens with its root expanded, like a file. The views, search, queries, panels, lint, and Save Formatted Copy… work on it, and every copy of a value is exact: long numbers, duplicate keys, and escapes stay as they were pasted. The document cannot be edited, and it is not reopened with your session.
To keep it, press Ctrl+Shift+S or choose File → Save As…. JSON Digger writes the text exactly as it was pasted or received, and suggests a name such as pasted.json or the last part of the URL. Open the saved file to edit it.