JSON File Format - What is a JSON file? (2024)

What is a JSON file?

JSON (JavaScript Object Notation) is an open standard file format for sharing data that uses human-readable text to store and transmit data. JSON files are stored with the .json extension. JSON requires less formatting and is a good alternative for XML. JSON is derived from JavaScript but is a language-independent data format. The generation and parsing of JSON is supported by many modern programming languages. application/json is the media type used for JSON.

JSON File Format - Brief History

There was a need for real-time server to client communication that lead to the creation of JSON. The JSON format was first specified by Douglas Crockford in March 2001. JSON was based on Standard ECMA-262 3rd Edition—December 1999 which is a subset of JavaScript.

The first edition of JSON standard ECMA-404 was published in October 2013 by Ecma International. RFC 7159 became the main reference for JSON’s Internet uses in 2014. In November 2017, ISO/IEC 21778:2017 was published as an international standard. RFC 8259 was published on 13 December 2017 by The Internet Engineering Task Force which is the current version of the Internet Standard STD 90.

JSON File Structure

JSON data is written in key/value pairs. The key and value are separated by a colon(:) in the middle with the key on the left and the value on the right. Different key/value pairs are separated by a comma(,). The key is a string surrounded by double quotation marks for example “name”. The values can be of the following types.

  • Number

  • String: Sequence of Unicode characters surrounded by double quotation marks.

  • Boolean: True or False.

  • Array: A list of values surrounded by square brackets, for example

    [ "Apple", "Banana", "Orange" ]
  • Object: A collection of key/value pairs surrounded by curly braces, for example

    {"name": "Jack", "age": 30, "favoriteSport" : "Football"}

JSON objects can also be nested to represent the structure of the data. Given below is an example of a JSON object.

JSON Format Example

{ "name":"Jack", "age":30, "contactNumbers":[ { "type":"Home", "number":"123 123-123" }, { "type":"Office", "number":"321 321-321" } ], "spouse":null, "favoriteSports":[ "Football", "Cricket" ]}

What is the maximum size of JSON file?

There is practically no limit on the maximum size of a JSON file. It can be as long as the space required by the contents to be stored.

When it comes to using JSON file format for transferring data over the internet, one needs to be careful about the available resources of computer. If large JSON data is transferred, the transfer will be affected if the client browser has limited memory.

There is no hard limit defined by specification, but you need to be careful not to exhaust resources on your users’ computers, as it will quickly degrade their user experience, and they will be likely to abandon your app.

JSON vs XML

XML is another common and widely used file format for exchange of data over the internet. When it comes to exchange of data between applications, developers have option of using both XML and JSON file formats. However, JSON is adopted as the most convenient way for data exchange between applications over the internet due to the following reasons.

  1. JSON gives a clear and easier to read view of data as compared to XML file formats
  2. JSON reduces the overhead of data transfer over the internet as it has less number of characters to define the same set of data as compared to XML
  3. Modern programming languages provide builtin parsers to parse the JSON response over the web.

FAQs

  • What is JSON file used for? JSON file format can be used as an intermediate file format for storing data generated data such as from a submitted form on a website. It is also used as a data format file for any programming language and provides interoperability between different types of data.
  • Is JSON and XML file same? Not really. JSON differs from XML in that JSON is shorter, can be read and right quickly, can use arrays and it doesn’t use end tag.
  • Can I convert JSON to CSV? Yes, there are certain online converter apps such as GroupDocs Conversion apps that can convert JSON to CSV.
  • How to Convert JSON to PDF? You can use online apps such as Asopse.app for Cells to convert JSON file to PDF.
  • How to Open a JSON file in Word? You can use online apps such as Aspose.app for Words to convert JSON file to Word.

Did you know?

You can become a contributor at FileFormat.com to keep the file format community up to date with your findings. If you have to share anything about JSON or Web file formats, you can post your findings in Web File Format News section for people to learn more form these.

References

JSON File Format - What is a JSON file? (2024)

FAQs

JSON File Format - What is a JSON file? ›

JSON (JavaScript Object Notation) is a lightweight data-interchange format. It is a text-based, human-readable format for representing simple data structures and associative arrays (called objects). JSON is the most commonly used format for data interchange on the web today, and is a language-independent format.

What is the JSON file? ›

JavaScript Object Notation (JSON) is a standard text-based format for representing structured data based on JavaScript object syntax. It is commonly used for transmitting data in web applications (e.g., sending some data from the server to the client, so it can be displayed on a web page, or vice versa).

What is a JSON file in Google Takeout? ›

Each picture and video exported from Takeout will be accompanied by a metadata.json file containing all the EXIF data. That data contains the information about how the picture was shot, the time and place, the people in the frame, the device used to take the picture, etc.

What should JSON file look like? ›

Valid JSON data can be in two different formats: A collection of key-value pairs enclosed by a pair of curly braces {...} . You saw this as an example above. A collection of an ordered list of key-value pairs separated by comma (,) and enclosed by a pair of square brackets [...] .

What is the correct format of a JSON file? ›

JSON File Structure

JSON data is written in key/value pairs. The key and value are separated by a colon(:) in the middle with the key on the left and the value on the right. Different key/value pairs are separated by a comma(,). The key is a string surrounded by double quotation marks for example “name”.

What is a JSON file in simple words? ›

JSON stands for JavaScript Object Notation. JSON is a lightweight format for storing and transporting data. JSON is often used when data is sent from a server to a web page. JSON is "self-describing" and easy to understand.

What is JSON with an example? ›

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.

Can you delete JSON files from Google Photos? ›

json files contain information about photos or albums, which was added in Google Photos. If you do not need that information (Descriptions, locations, changed dates etc) you can safely delete them.

How do I open a JSON file in Google? ›

Steps to open JSON files on Web browser (Chrome, Mozilla)
  1. Open the Web store on your web browser using the apps option menu or directly using this link.
  2. Here, type JSON View in search bar under the Extensions category.
  3. You will get the various extensions similar to JSON View to open the JSON format files.

Should I delete a JSON file? ›

json file. This file holds a list of your installed content, but does not actually contain the content itself. That makes it safe to delete when there are display issues, or there are download issues, allowing you to re-import your existing content.

How to read a JSON file? ›

In the below code, firstly we import the JSON module, open the file using the file handling open() function, and then store the data into the variable 'data' using the json.load() function. After that, we iterate over the data and print it.

Is a JSON file a text file? ›

A JSON file is simply a text file that uses JSON formatting. These files are used to store structured data and are identified by their “. json” extension.

How do I open a .JSON file? ›

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.

How to write in a JSON file? ›

Method 2: Writing data to JSON using json.

JSON can also be written to a file using the json. dump() method. Without first converting the dictionary into a JSON object, the "dump" function of the JSON package simply writes the dictionary to a file in the JSON format.

Should I delete JSON file? ›

json file. This file holds a list of your installed content, but does not actually contain the content itself. That makes it safe to delete when there are display issues, or there are download issues, allowing you to re-import your existing content.

How should I open a JSON file? ›

You can use any text/code editor such as Visual Studio Code, Notepad, Notepad++, Sublime Text and others to open and edit JSON files.

Top Articles
Self-Insured vs. Fully Insured
What are the 7 P's of the Marketing Mix?
English Bulldog Puppies For Sale Under 1000 In Florida
Katie Pavlich Bikini Photos
Gamevault Agent
Pieology Nutrition Calculator Mobile
Hocus Pocus Showtimes Near Harkins Theatres Yuma Palms 14
Hendersonville (Tennessee) – Travel guide at Wikivoyage
Compare the Samsung Galaxy S24 - 256GB - Cobalt Violet vs Apple iPhone 16 Pro - 128GB - Desert Titanium | AT&T
Vardis Olive Garden (Georgioupolis, Kreta) ✈️ inkl. Flug buchen
Craigslist Dog Kennels For Sale
Things To Do In Atlanta Tomorrow Night
Non Sequitur
Crossword Nexus Solver
How To Cut Eelgrass Grounded
Pac Man Deviantart
Alexander Funeral Home Gallatin Obituaries
Energy Healing Conference Utah
Geometry Review Quiz 5 Answer Key
Hobby Stores Near Me Now
Icivics The Electoral Process Answer Key
Allybearloves
Bible Gateway passage: Revelation 3 - New Living Translation
Yisd Home Access Center
Pearson Correlation Coefficient
Home
Shadbase Get Out Of Jail
Gina Wilson Angle Addition Postulate
Celina Powell Lil Meech Video: A Controversial Encounter Shakes Social Media - Video Reddit Trend
Walmart Pharmacy Near Me Open
Marquette Gas Prices
A Christmas Horse - Alison Senxation
Ou Football Brainiacs
Access a Shared Resource | Computing for Arts + Sciences
Vera Bradley Factory Outlet Sunbury Products
Pixel Combat Unblocked
Movies - EPIC Theatres
Cvs Sport Physicals
Mercedes W204 Belt Diagram
Mia Malkova Bio, Net Worth, Age & More - Magzica
'Conan Exiles' 3.0 Guide: How To Unlock Spells And Sorcery
Teenbeautyfitness
Where Can I Cash A Huntington National Bank Check
Topos De Bolos Engraçados
Sand Castle Parents Guide
Gregory (Five Nights at Freddy's)
Grand Valley State University Library Hours
Hello – Cornerstone Chapel
Stoughton Commuter Rail Schedule
Nfsd Web Portal
Selly Medaline
Latest Posts
Article information

Author: Geoffrey Lueilwitz

Last Updated:

Views: 5772

Rating: 5 / 5 (80 voted)

Reviews: 95% of readers found this page helpful

Author information

Name: Geoffrey Lueilwitz

Birthday: 1997-03-23

Address: 74183 Thomas Course, Port Micheal, OK 55446-1529

Phone: +13408645881558

Job: Global Representative

Hobby: Sailing, Vehicle restoration, Rowing, Ghost hunting, Scrapbooking, Rugby, Board sports

Introduction: My name is Geoffrey Lueilwitz, I am a zealous, encouraging, sparkling, enchanting, graceful, faithful, nice person who loves writing and wants to share my knowledge and understanding with you.