JSON Interview Questions

JSON Interview Questions | Freshers & Experienced

  • Sharad Jaiswal
  • 12th Feb, 2021
  • 1070 Followers

JSON Interview Questions

Q1. What is JSON?

Q2. Enlist few advantages of using JSONs?

Q3. Who is known as the father of JSON?

Q4. What extension is used to save JSON file?

Q5. Enlist data types available in JSON?

Q6. What two main structures used to compose JSON?

Q7. How do you decode a JSON string?

Q8. What is the default value of a constructor's prototype?

Q9. List some benefits of JSON over XML?

Q10. What is MIME type for JSON data?

Q11. What is JSON Validator?

Q12. What is JSON Schema?

Q13. What is JSON-RPC? List some Features of JSON-RPC-Java.

Q14. What is BSON?

Q15. How to convert an Object into JSON?

Q16. What does $.parseJSON() do ?

The use of JSON is growing rapidly due to its light-weight and compact feature. Along with this, sharing is too fast because it uses an array to store the data and also you can share any size of data such as videos, images, etc. This is a brief introduction to JSON. If you want to know its advantages, disadvantages, and features, then visit our JSON online interview questions. This will help you to understand the basic concepts of JSON and enable you to crack any interviews. Check and start today!

Which is better?

JSON

XML

JSON stands for JavaScript Object Notation XML stands for extensible Markup Language. JSON has a more compact style than XML, and it is more readable. XML is less simple, therefore, not easy to read
JSON is much lightweight, so it can make significant improvements in RESTful APIs working with complex systems. XML is not much lightweight.
JSON uses less data, thus, increases the parsing speed. XML software takes more time in parsing due to the DOM manipulation libraries.
JSON uses a map data structure XML uses a tree structure JSON is data-oriented. XML is document-oriented.
JSON doesn't provide display capabilities. XML provides display capabilities because it is a markup language.
JSON is less secured than XML due to the possibility of hacking. XML is more secure.
JSON supports limited data types such as text and number data type. XML support many data types such as images, charts, graphs, texts, etc. JSON supports an array. XML doesn’t support array.

Advantage of JSON:

  • Small and light weighted syntax: In many languages, the syntax is quite difficult to remember which wastes the developer’s time. But, in JSON this problem is solved, here the syntax is very easy to use. Its syntax is very small and lightweight; therefore, it executes the queries very rapidly.
  • JSON on the server side: It is quite obvious that fast response on the server side fascinates the developers to use that language. Similar, in the case of JSON, server-side parsing is fast enough that developers choose JSON for server-side programming. It is the strongest point of JSON that makes it popular among users.
  • Browser compatibility: When the developer designs the application, it is inevitable to write code differently for different browsers. This makes the burden on the developers. But you don't need to worry while programming in JSON. JSON provides a wide range of browsers that are compatible with the different operating system. Also, the developer requires just a little effort to make the application compatible with all browsers.
  • Data Transfer: You can share any size of data such as audios, videos or larger files with JSON. It is the topmost tool for sharing the data. This is possible because JSON saves the data in an array format which is easier to transfer. This is the reason, why JSON is given a preference for files format of web APIs and web development.
  • Easy to read: The structure of JSON is quite easy to understand. It doesn’t matter which language you are using, with JSON you can easily do the mapping with domain objects.
  • Conversion: Since, JavaScript has the built-in function to translate the JSON format string into native JavaScript object so, it is quite easy to convert.

Disadvantages of JSON:

  • Error handling: The major drawback of JSON is no error handling for JSON calls. It fully depends on dynamic script insertion. If it inserted, then it works and you get calls and responses perfectly. But if it is not inserted, then it will fail silently and you will not know about that. For instance, if there is an error in the server side, you will not able to recognize that such as 404 error. You can't restart or cancel the request as you don't know about the error. You just wait for a timeout.
  • Hacking: It is dangerous if JSON is used with untrusted browsers or services. As JSON service returns a response covered in a function call which is executed by a browser. But, if this browser is untrusted, then the response can be hacked. This makes the hosting application insecure to attacks.

About Author :

  • Author of JSON Interview Questions

    Sharad Jaiswal

    My name is Sharad Jaiswal, and I am the founder of Conax web Solutions. My tech stacks are PHP, NodeJS, Angular, React. I love to write technical articles and programming blogs.

Leave A Comment :

Valid name is required.

Valid name is required.

Valid email id is required.