Q1. What is JSON?
Q2. Enlist few advantages of using JSONs?
The advantages of using JSONs are as follows:
Q3. Who is known as the father of JSON?
Q4. What extension is used to save JSON file?
The extension that is used to save JSON files is .json.
Q5. Enlist data types available in JSON?
The data types available in JSON are as follows:
Q6. What two main structures used to compose JSON?
The two main structures used to compose JSON are keys and values. It can be explained as:
Key: A key is always a string enclosed in quotation marks.
Value: A value can be a string, number, boolean expression, array, or object.
Q7. How do you decode a JSON string?
You can decode a JSON string with the help of json_decode() function. json_decode() function iis an inbuilt function in PHP that can converts a JSON encoded string into a PHP variable. Syntax: json_decode( $json, $assoc = FALSE, $depth = 512, $options = 0 )
Q8. What is the default value of a constructor's prototype?
The constructor property returns a reference to the Object constructor function that created the instance object. There is no default value of a constructor's prototype.
Q9. List some benefits of JSON over XML?
Some of the benefits of JSON over XML are as follows:
Q10. What is MIME type for JSON data?
MIME-type stands for A multipurpose internet mail extension that is an internet standard that describes the contents of internet files based on their natures and formats. In general, the text/plain was typically used for JSON, but according to IANA, the official MIME type for JSON is application/JSON.
Q11. What is JSON Validator?
Q12. What is JSON Schema?
In JSON, a JSON Schema is a grammar language for defining the structure, content, and semantics of JSON objects, that lets you specify metadata about what an object's properties mean and what values are valid for those properties. It is a specification for JSON-based format for defining the structure of JSON data.
Q13. What is JSON-RPC? List some Features of JSON-RPC-Java.
JSON-RPC is a call protocol that uses JSON for encoding messages. It is a simple and easy protocol just like XML-RPC. It supports multiple calling and notifications. In short, JSON-RPC is the method of sending a request to someone and receiving the response from another side.
Q14. What is BSON?
BSON stands for Binary JSON which is used by MongoDB. It is basically a superset of JSON with some more data types, most importantly binary byte array, and uses more space as compared to JSON and it allows you to effectively skip the records that you’re not fascinated with when perusing it.
Q15. How to convert an Object into JSON?
You can convert a Java object into a JSON object with the help of the GSON library. You can perform it by following the given steps:
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!
|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 types.||XML support many data types such as images, charts, graphs, texts, etc. JSON supports an array. XML doesn’t support array.|
Advantage of JSON:
Disadvantages of JSON: