Let’s see json interview questions and answers
What is MIME format type JSOn file content
MIME is abbreviated as Multipurpose Internet Mail Extensions, It is a format used to send in requests and responses, transferred between client and server across the internet. Content-Type and Accept headers in a request object are specified with this format following is the mime type for these documents
application/json
and request contains the below value for INI data sending over the internet
Content-type : application/json
How to open a json file.
JSON files are with keys and values with extensions. It includes plain text content with special rules.
All the popular IDE supports the json file extension and also provides plugins to validate the json file content.
- Notepad++
- Eclipse
- Visual Studio Code
What is the JSON file used for?
The JSON file is used to transfer data between the Client and Server using HTTP APIs. It can also be used to store environment information for configuration.
The following are uses cases
- API Communication with the producer returns the JSON object, Consumer consumes it
- Serialization of data between different machines.
What is an extension of a JSON object file?
JSOn content is placed in a file with the extension .json
.
JSON files can be created and updated with any text editor or IDE or simple notepad.
What is full-form JSON?
JavaScript Object Notation is a full form for JSON.
What is the difference between JSON and XML?
JSON is a simple javascript object notation with the key and value of data types XML is an Extensible markup language with data of no type
JSON | XML |
---|---|
javascript object notation | Extensible markup language |
Complex data format based on schema | Lightweight data format |
Easy to read by humans | It is very difficult to read by humans |
Data is represented as keys and values like objects | It has start and end tags |
Supports Array with a list of values | No support for arrays |
Comments are not supported | Allows Comments |
Limited Security support | Security is good |
Encoding is UTF-8 | Supports all encodings UTF-8, ISO-8859-1, etc |