File TypeJavaScript Object Notation File
Software that will open, convert or fix JSON files. These apps are known to open certain types of JSON files. Since many different programs may use JSON files for different purposes, you may need to try a few of the apps to open your specific JSON file. JSON is a plain text file that can be opened in a text editor. You can easily modify and save it back without any special software. But the chances are that you might break the formatting and any error in formatting will result in failure of the application during the loading of the JSON file. OPENJSON is a table-valued function that parses JSON text and returns objects and properties from the JSON input as rows and columns. In other words, OPENJSON provides a rowset view over a JSON document. You can explicitly specify the columns in the rowset and the JSON property paths used to populate the columns. How to open the JSON file? In Windows, you can open the file with other types of text editor like Notepad to view its content. Right-click the file, choose “Open With” from the drop-down menu. Click the text editor on the submenu or click “Browse” if the text editor is not listed to open and view JSON files.
Developer | N/A |
Popularity | |
Category | Web Files |
Format | Text |
What is a JSON file?
A JSON file is a file that stores simple data structures and objects in JavaScript Object Notation (JSON) format, which is a standard data interchange format. It is primarily used for transmitting data between a web application and a server. JSON files are lightweight, text-based, human-readable, and can be edited using a text editor.
The JSON format was originally based on a subset of JavaScript but is considered a language-independent format, being supported by many different programming APIs. JSON is commonly used in Ajax Web application programming. It is becoming increasingly popular as an alternative to XML.
While many applications use JSON for data interchange, they may not actually save .json files on the hard drive since the data interchange occurs between Internet-connected computers. However, some applications do enable users to save .json files. One example is Google+, which uses JSON files for saving Profile data. After logging in, you can choose the 'Data liberation' page and select 'Download your Profile data.'
Mozilla Firefox saves bookmark backups using JSON files. The files are saved to the Firefox user profile directory within a folder called bookmarkbackups. You can also make manual backups of Firefox bookmarks and import them into a different copy of Firefox. To import, open the bookmark Library, click the import/export button in the top bar, choose Restore → Choose File..., and then select your JSON backup file.
How do I open a JSON file?
Because JSON files are plain text files, you can open them in any text editor, including:
- Microsoft Notepad (Windows)
- Apple TextEdit (Mac)
- Vim (Linux)
- GitHub Atom (cross-platform)
You can also open a JSON file in the Google Chrome and Mozilla Firefox web browsers by dragging and dropping the file into your browser window.
Open and view .JSON files with File Viewer Plus.Programs that open JSON files
Windows
Free Trial
Free Trial
Included
Included
Free
Free
Free
Free
Mac
Included
Free
Free
Free
Free
Linux
Free
Free
Free
Free
Free
Free
iOS
Free
Free
Android
Free+
Free
Free
Updated 9/24/2020
JSON is a format for storing and transporting data.
JSON is often used when data is sent from a server to a web page.
What is JSON?
- JSON stands for JavaScript Object Notation
- JSON is a lightweight data interchange format
- JSON is language independent *
- JSON is 'self-describing' and easy to understand
* The JSON syntax is derived from JavaScript object notation syntax, but the JSON format is text only. Code for reading and generating JSON data can be written in any programming language.
JSON Example
This JSON syntax defines an employees object: an array of 3 employee records (objects):
JSON Example
{
'employees':[
{'firstName':'John', 'lastName':'Doe'},
{'firstName':'Anna', 'lastName':'Smith'},
{'firstName':'Peter', 'lastName':'Jones'}
]
}
'employees':[
{'firstName':'John', 'lastName':'Doe'},
{'firstName':'Anna', 'lastName':'Smith'},
{'firstName':'Peter', 'lastName':'Jones'}
]
}
The JSON Format Evaluates to JavaScript Objects
The JSON format is syntactically identical to the code for creating JavaScript objects.
Because of this similarity, a JavaScript program can easily convert JSON data into native JavaScript objects.
JSON Syntax Rules
- Data is in name/value pairs
- Data is separated by commas
- Curly braces hold objects
- Square brackets hold arrays
JSON Data - A Name and a Value
JSON data is written as name/value pairs, just like JavaScript object properties.
A name/value pair consists of a field name (in double quotes), followed by a colon, followed by a value:
JSON names require double quotes. JavaScript names do not.
JSON Objects
JSON objects are written inside curly braces.
Just like in JavaScript, objects can contain multiple name/value pairs:
JSON Arrays
JSON arrays are written inside square brackets.
Just like in JavaScript, an array can contain objects:
'employees':[
{'firstName':'John', 'lastName':'Doe'},
{'firstName':'Anna', 'lastName':'Smith'},
{'firstName':'Peter', 'lastName':'Jones'}
]
{'firstName':'John', 'lastName':'Doe'},
{'firstName':'Anna', 'lastName':'Smith'},
{'firstName':'Peter', 'lastName':'Jones'}
]
In the example above, the object 'employees' is an array. It contains three objects.
Each object is a record of a person (with a first name and a last name).
Converting a JSON Text to a JavaScript Object
A common use of JSON is to read data from a web server, and display the data in a web page.
For simplicity, this can be demonstrated using a string as input.
First, create a JavaScript string containing JSON syntax:
var text = '{ 'employees' : [' +
'{ 'firstName':'John' , 'lastName':'Doe' },' +
'{ 'firstName':'Anna' , 'lastName':'Smith' },' +
'{ 'firstName':'Peter' , 'lastName':'Jones' } ]}';
'{ 'firstName':'John' , 'lastName':'Doe' },' +
'{ 'firstName':'Anna' , 'lastName':'Smith' },' +
'{ 'firstName':'Peter' , 'lastName':'Jones' } ]}';
Then, use the JavaScript built-in function
JSON.parse()
to convert the string into a JavaScript object:Finally, use the new JavaScript object in your page:
Example
<p></p>
<script>
document.getElementById('demo').innerHTML =
obj.employees[1].firstName + ' ' + obj.employees[1].lastName;
</script>
Try it Yourself »<script>
document.getElementById('demo').innerHTML =
obj.employees[1].firstName + ' ' + obj.employees[1].lastName;
</script>
Open Json Files Online
You can read more about JSON in our JSON tutorial.