What is json file

What is a JSON file?

What is a JSON file?

A JSON File is a containing JSON object and JSON Array. Files are easily editable with any text editor.

JSON is used for exchange data over the internet same as XML. You can send and received data through JSON. all JSON data has a name and value pair that is separated by a colon(:).

The MIME type for JSON text is “application/JSON”

You can refer below files. This file contains that JSON object.

{
    "firstName": "Racks",
    "lastName": "jacson",
    "gender": "man",
    "age": 24,
    "address": {
        "streetAddress": "Udhna",
        "city": "San Jone",
        "state": "CA",
        "postalCode": "95221"
    },
    "phoneNumbers": [
        { "type": "home", "number": "27627" }
    ]
}

How to create a JSON file?

Check out the below article for this.

It is simple and easy with any text editor you can create JSON files.

how to create JSON file?

How to open a JSON file?

If you want to open a file in your local then you can open it into any text editor that will not format that file but it will open that file.

Visual Studio Code has an extension to format JSON.

How to open JSON file in chrome

Your local file will also open into chrome and there are many extensions available for format JSON.

Just open with Google Chrome and your file will open to chrome. directly JSON URL is also open to chrome. try with below JSON API.

It looks like the below picture. it is an easy and simple file that is open in the browser.

Display JSON File Chrome

Open JSON file online

For online you can use awesome tools JSON Beautifier that will help to open the file from URL and Local drive. It will help to edit the file online.

Sample JSON files

Check the below article.

Sample JSON file

 

You can also call sample-JSON API directly.

https://tools.learningcontainer.com/sample-json.json

You need to save the above code with .json extension.
You can refer https://tools.learningcontainer.com/jsonviewer/ to display data in the proper format and you can compare to JSON file https://jsoncompare.org. If you want to create JSON files online then use https://jsonbeautifier.org

Leave a Comment

%d bloggers like this: