JSON MCQs – JSON in Real-world Applications

11.) Which of these web technologies heavily relies on JSON for communication?

A) WebSockets
B) HTTP/2
C) GraphQL
D) SOAP

Answer: Option A

Explanation: WebSockets often use JSON to exchange data between clients and servers in real time.

12.) What is the advantage of using JSON in IoT (Internet of Things) devices?

A) It reduces power consumption
B) It provides a lightweight and flexible data format
C) It is faster than wireless communication
D) It encrypts all data automatically

Answer: Option B

Explanation: JSON’s lightweight nature makes it suitable for IoT devices with limited resources.

13.) What does the .eslintrc.json file configure in JavaScript projects?

A) Project dependencies
B) Database schemas
C) Linting rules and code quality settings
D) Server configurations

Answer: Option C

Explanation: The .eslintrc.json file specifies linting rules and code quality settings for JavaScript projects.

14.) How does Elasticsearch use JSON?

A) To define relational tables
B) To store and query documents
C) To render dashboards
D) To validate user input

Answer: Option B

Explanation: Elasticsearch stores data as JSON documents and uses JSON for queries and responses.

15.) What is the primary role of JSON in GraphQL APIs?

A) To define the schema
B) To handle authentication
C) To format query results
D) To manage subscriptions

Answer: Option C

Explanation: In GraphQL, JSON is used to format the results returned by queries.

16.) Which messaging protocol often uses JSON for message payloads?

A) MQTT
B) SMTP
C) POP3
D) FTP

Answer: Option A

Explanation: MQTT, a lightweight messaging protocol for IoT, often uses JSON for its message payloads.

17.) What is a common use of JSON in analytics platforms?

A) Defining UI components
B) Generating static reports
C) Compiling JavaScript files
D) Storing raw event data

Answer: Option D

Explanation: JSON is often used to store raw event data for further analysis in analytics platforms.

18.) Which testing tools commonly use JSON for request and response data?

A) Postman and JMeter
B) Selenium and Puppeteer
C) Figma and Sketch
D) Jenkins and Kubernetes

Answer: Option A

Explanation: Tools like Postman and JMeter use JSON extensively for API testing and response validation.

19.) How is JSON used in data interchange for machine learning models?

A) To compile machine learning libraries
B) To train models directly
C) To serialize model configurations and results
D) To render visualizations

Answer: Option C

Explanation: JSON is often used to serialize and store configurations, parameters, and results for machine learning models.

Leave a Reply

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