IT & Software

Top 10 JSON Interview Questions & Answer

Read the important current affairs of 15 July 2026 for SSC, Banking, UPSC, Railway and all competitive exams.

6 May 2024 5 Min Read Quizer Team 547 Views
Top 10 JSON Interview Questions & Answer

06

May 2024

1. What is JSON? JSON is the abbreviation of JavaScript Object Notation. It is one of the simplest data interchange formats, independent of programming lan

1. What is JSON?

JSON is the abbreviation of JavaScript Object Notation. It is one of the simplest data interchange formats, independent of programming language and platform. Its lightweight text-based structure makes it easily readable. It is derived from JavaScript for presenting simple data in the form of key-value pairs.

It is often used for serialization and transmission of data between network connections. It is mostly used for data transmission between a web application and the server thereby making it a popular alternative to the XML format.

 

2. How many data types are there in JSON?

There are six types of data types in JSON -

  1. Number
  2. String
  3. Boolean
  4. Array
  5. Object
  6. Null

 

3. What is meant by JSON objects?

An object is defined as a set of key-value pairs. A JSON starts with a left brace “{“ and ends with another right brace “}”. Every key is followed by a colon “:” and the key-value pairs are separated from each other by using a comma “,”. So, basically, the JSON object is a collection of keys along with their values arranged in a pre-specified JSON format.

 

4. What is the difference between XML and JSON?

  1. XML requires XML parser to parse it. JSON is parsed with the help of JavaScript functions.
  2. XML is heavy and verbose. JSON is short and lightweight.
  3. File extension of XML data is .xml. File extension of JSON data is .json.
  4. XML is document based. JSON is data based.
  5. JSON is simple to read, write and understand. XML is less simple to read, write and understand.
  6. Array is supported by JSON. Array is not supported by XML.
  7. JSON stands for JavaScript Object Notation. XML stands for Extensible Markup Language.

 

5. Which functions are used for encoding and decoding JSON in PHP?

For encoding, json_encode() function is used. This function takes PHP value like array as input and returns JSON representation of it. For decoding, json_decode() function is used. This function takes JSON string as input and returns associative array.

 

6. What are the uses of JSON?

JSON is mainly used for data interchange between the two systems.

  • JSON is prominently used for the transmission of serialized data over a network connection between two systems.
  • APIs and web services use JSON to format and transfer data.
  • JSON can be used in combination with most modern programming languages.
  • JSON can be used with JavaScript applications such as browser plugins and websites.
  • JSON can be used to read data from the web server and display data on the web pages.

 

7. Mention what is JSONP?

JSONP stands for JSON with padding. It is a method used to bypass the cross-domain policies in web browsers. In other words, JSONP is the simple way to deal with browser restrictions when sending JSON responses from different domains from the client.

 

8. Mention what is the difference between JSON and JSONP?

  • JSON: JSON is a simple data format used for communication medium between different systems
  • JSONP: It is a methodology for using that format with cross domain ajax requests while not being affected by same origin policy issue.

 

9. What is the difference between JSON parse and JSON Stringy?

JSON.stringify() is to create a JSON string out of an object/array. They are the inverse of each other. JSON.stringify() serializes a JS object into a JSON string, whereas JSON.parse() will deserialize a JSON string into a JS object.

 

10. What are the limitations of JSONP?

JSONP is used to bypass the same-origin policy of web browsers. It may seem like a perfect way to get around the restriction but it has its own set of limitations as well. They are:

  • As all the JSONP calls are made by including a [removed] tag, the request made is confined only to the GET method.
  • It cannot be used for POST or PUT requests.
  • It can be used only for read-only services and APIs.
Why Quizer.in is Important?

Quizer.in is your complete one-stop platform for daily current affairs, interactive quizzes, and exam-focused study material. Whether you are preparing for SSC, Banking, Railway, UPSC, State PSC or Teaching exams, regular practice on Quizer.in helps you:

  • Stay updated with the latest current affairs
  • Improve accuracy and speed through daily quizzes
  • Strengthen your General Awareness section
  • Build consistency and stay ahead of the competition
Quizer Team
About the Author

Quizer Team

Passionate about current affairs, competitive exams, and helping aspirants succeed.

📢 Join Our WhatsApp Channel

Get Daily GK, Current Affairs, Amazing Facts & Quiz Updates.

🚀 Join Now

Comments (0)

No comments yet — be the first to comment! 💬

Leave a Comment

Your email address will not be published. Required fields are marked *

Stay Updated!

Subscribe to receive daily Current Affairs, Exam Tips and Government Job updates.

Join Monthly Challenge

Compete, Learn & Win exciting prizes.

  • Cash Rewards
  • E-Certificates
  • Leaderboard Ranking
  • Daily Practice
Join Now

Related Blogs

View All
IT & Software
Learn Programming Fast And Improve Your Coding Skills Easy
20 Jul 2024 1376
Read More
IT & Software
How to Create a Website Step by Step Guide
1 Sep 2024 1023
Read More
IT & Software
A Complete Guide to Docker: Simplifying Application Deployment
26 Sep 2025 965
Read More