Search Tutorials


Top JSON Interview Questions | JavaInUse

JSON Interview Questions


In this post we will look at JSON Testing Tool Interview questions. Examples are provided with explanation.


Q: Explain what is JSON?
A:
JSON (JavaScript Object Notation) is a lightweight data-interchange format. It is easy for humans to read and write. It is easy for machines to parse and generate. It is based on a subset of the JavaScript Programming Language
The JSON format is often used for serializing and transmitting structured data over a network connection. It is used primarily to transmit data between a server and web application, serving as an alternative to XML.

Q: What are the advantages and disadvantages of using JSON?
A:
The Advantages of using JSON are as follows-
  • Smaller message size
  • More structural information in the document
  • Can easily distinguish between the number 1 and the string "1" as numbers, strings (and Booleans) are represented differently in JSON.
  • Can easily distinguish between single items and collections of size one (using JSON arrays).
  • Easier to represent a null value
  • Easily consumed by JavaScript
The Advantages of using XML are as follows-
  • Namespaces allow for sharing of standard structures
  • Better representation for inheritance
  • Standard ways of expressing the structure of the document: XML schema, DTD, etc
  • Parsing standards: DOM, SAX, StAX
  • Standards for querying: XQuery and XPath
  • Standards for transforming a document: XSLT

Q: What is JSON RPC?
A:
JSON-RPC is a stateless, light-weight remote procedure call (RPC) protocol. Primarily this specification defines several data structures and the rules around their processing. ..It uses JSON (RFC 4627) as data format.


Q: What data types are supported by JSON?
A:
The data types are as follows -
  • string
  • object
  • array
  • boolean
  • null
Q: What are some popular JSON tools?
A:
The popular JSON tools are as follows -
  • JSONLint - https://jsonlint.com
  • JSON Editor Online - https://jsoneditoronline.org/
  • JSON Minifier Tool - https://www.browserling.com/tools/json-minify
  • JSON to XML Converter - https://codebeautify.org/jsontoxml
  • JSON Formatter - https://jsonformatter.curiousconcept.com/
Q: What is BSON?
A:
BSON is a computer data interchange format. The name "BSON" is based on the term JSON and stands for "Binary JSON". It is a binary form for representing simple or complex data structures including associative arrays (also known as name-value pairs), integer indexed arrays, and a suite of fundamental scalar types. BSON originated in 2009 at MongoDB.

See Also

Spring Batch Interview Questions Apache Camel Interview Questions JBoss Fuse Interview Questions Drools Interview Questions Java 8 Interview Questions