Use the JSON viewer to automatically format and syntax highlight JSON responses and files in browser tabs.
The JSON viewer changes the returned JSON data to make it easier to read. Sometimes a web server responds to HTTP requests by returning data encoded as JSON. JSON data can be difficult to read when it's formatted as a single long, concatenated line of text. The same can occur when opening a JSON file from disk.
The JSON viewer improves readability of JSON data in several ways:
The JSON syntax is highlighted with different colors.
Object properties are displayed on their own lines and indented.
Objects can be collapsed or expanded.
The JSON viewer matches your operating system's dark or light theme.
Supported scenarios
The JSON viewer is not supported in windows that are opened by using the window.open JavaScript method. In windows opened with window.open, JSON data is displayed as a single line of text, without formatting or syntax highlighting.
View reformatted JSON server responses
To view a JSON response from a web server as reformatted JSON:
To view a JSON file stored on your device as reformatted JSON:
Open a new tab or window in Microsoft Edge.
Press Ctrl+O on Windows and Linux, or Command+O on macOS, and then select a JSON file.
Microsoft Edge detects that the file contains JSON data and formats it automatically:
Detect invalid JSON data
JSON data can sometimes be invalid. For example, the following patterns are invalid in JSON:
Omitting double quotes around a key name.
Having a trailing comma after the last key/value pair.
The JSON viewer applies syntax highlighting to invalid JSON. However, the JSON viewer doesn't format the content, and you can't collapse or expand objects.
You can find information about the invalid syntax in the Console tool, where the JSON viewer reports errors.
Microsoft Edge detects that the file contains invalid JSON data, and colorizes the JSON listing, but doesn't wrap or otherwise reformat the JSON listing. The fact that the JSON isn't wrapped indicates there's malformed JSON.
Open the Console tool by pressing Ctrl+Shift+J (Windows, Linux) or Command+Option+J (macOS).
A JavaScript error indicates where the JSON syntax error is located:
In a code editor, such as Microsoft Visual Studio Code, go to the indicated column number to inspect the JSON:
Search the JSON data
To search for text within the JSON data, use the JSON viewer's Find feature, as follows:
View a JSON response or file in the JSON viewer.
Click anywhere in the formatted JSON data, to put focus in the JSON data.
Press Ctrl+F (Windows, Linux) or Command+F (macOS). The search toolbar appears at the top of the JSON viewer:
In the Find text box, start typing the text you want to search for. As you type, the JSON viewer highlights all of the occurrences of the text string in the JSON data.
To stop the search, click the Cancel button in the JSON viewer's toolbar.
Move through the search results
To move to the next or previous search result, after results were found, click the Next or Previous buttons in the search toolbar. The currently selected search result is highlighted in a different color:
Modify the type of search
The search toolbar contains Match Case, Regexp, and By Word checkboxes, to modify the type of search:
Perform a case-sensitive search
By default, the search is case-insensitive. For example, a search on hello matches Hello, HELLO, hello, or any string that contains the characters hello with any casing.
To make the search case-sensitive, select the Match Case checkbox in the search toolbar.
Search by a regular expression
By default, the search string is treated as a literal string.
To search by using a regular expression, select the Regexp checkbox in the search toolbar.
Search by whole word only
By default, the search is not restricted to finding just the whole, isolated word surrounded by spaces. For example, a search on hello matches hello, hello-world, and world-hello, or any string that contains the sequence of characters hello.
To restrict the search to match only the string surrounded by spaces, without adjacent letters, select the By Word checkbox in the search toolbar.
Right-click on the page, select “Inspect,” and go to the “Network” tab. Reload the page. Look for the request that returned JSON data, click on it, and view the JSON content in the “Response” tab.
Right-click on the page, select “Inspect,” and go to the “Network” tab. Reload the page. Look for the request that returned JSON data, click on it, and view the JSON content in the “Response” tab.
Format JSON is the same as beautify JSON : you make your JSON file readable by styling it with white spacing, newlines, and indentation. In short: paste your JSON file, then click the "Format" button in code mode, or select "Copy formatted" from the menu. This is how you make your JSON pretty.
Opening JSON files is far more straightforward than you might think; it is a very simple data structure that is entirely text-based — which is why it is limited to strings and numbers. Because of this, you can use any file opener to view a JSON file, such as notepads, text editors, and even command-line interfaces.
Getting a specific property from a JSON response object
Instead, you select the exact property you want and pull that out through dot notation. The dot ( . ) after response (the name of the JSON payload, as defined arbitrarily in the jQuery AJAX function) is how you access the values you want from the JSON object.
To view a JSON response from a web server as reformatted JSON: Open a new tab or window in Microsoft Edge.Type a URL that returns JSON data in the address bar. For example, use this sample JSON response: https://microsoftedge.github.io/Demos/json-dummy-data/256KB-min.json.
Strings: All strings must be wrapped in double quotes (" "). Single quotes (' ') are not valid. Data Types: JSON supports several types including strings, numbers, booleans (true or false), arrays, and objects ({}).
For Windows, you can use Microsoft Notepad or Visual Studio Code. Mac users can opt for Apple TextEdit or Mac Vim, while Linux users might prefer the Vim editor or PICO. Web Browsers: Both Google Chrome and Mozilla Firefox can display JSON files.
A common use of JSON is to exchange data to/from a web server. When receiving data from a web server, the data is always a string. Parse the data with JSON.parse() , and the data becomes a JavaScript object.
With the plugin installed, open the JSON file you want to format in Notepad++. Go to the Plugins menu and select the JSON Viewer option. This will open a new window that displays the JSON code with proper indentation and color-coded syntax highlighting to make it easier to read and edit.
Assuming a Windows operating system, right-click the . json file and select Open With, then select Notepad, WordPad, or any other text editor that you have installed.
JSON is a file format that uses human-readable language to store and communicate data objects. JSON (JavaScript Object Notation) is defined as a file format used in object-oriented programming that uses human-readable language, text, and syntax to store and communicate data objects between applications.
Answer. Google Developer Tools will be displayed at the bottom of the browser. Locate the JSON on the left column and select the "Response" tab. Copy and paste the JSON into a text document for further review.
Assuming a Windows operating system, right-click the .json file and select Open With, then select Notepad, WordPad, or any other text editor that you have installed. If you leave the option “Always use this app to open . json files” checked, then you will be able to just double-click the .
Address: Suite 492 62479 Champlin Loop, South Catrice, MS 57271
Phone: +9663362133320
Job: District Sales Analyst
Hobby: Digital arts, Dance, Ghost hunting, Worldbuilding, Kayaking, Table tennis, 3D printing
Introduction: My name is Kieth Sipes, I am a zany, rich, courageous, powerful, faithful, jolly, excited person who loves writing and wants to share my knowledge and understanding with you.
We notice you're using an ad blocker
Without advertising income, we can't keep making this site awesome for you.