JN0-224 practice question 2 of 15

Which two data structures are used in JSON? (Choose two.)

Full set: 66 questions
Answer options
A: tuples
B: objects Correct answer
C: arrays Correct answer
D: dictionaries
Correct Answer:
B. objects; C. arrays
Explanation

The JSON (JavaScript Object Notation) data interchange format is built upon two fundamental structures. The first is an object, which is an unordered collection of key/value pairs enclosed in curly braces ({}). The second is an array, which is an ordered list of values enclosed in square brackets ([]). These two structures, combined with primitive data types (strings, numbers, booleans, and null), constitute the entirety of the JSON syntax.

Why Incorrect

A. tuples: This is an immutable data structure specific to languages like Python and is not a native data structure defined in the JSON standard.
D. dictionaries: While a JSON object is functionally equivalent to a dictionary in many programming languages, the official term used in the JSON standard is "object".

References

1. Internet Engineering Task Force (IETF) RFC 8259: "The JavaScript Object Notation (JSON) Data Interchange Format", Section 1, Introduction. This document, which defines the JSON standard, states: "JSON is built on two structures: A collection of name/value pairs. In various languages, this is realized as an object... An ordered list of values. In most languages, this is realized as an array..."

2. Juniper Networks TechLibrary: "Junos OS Automation Scripting User Guide", section "JSON Data Format for Configuration Data". This official Juniper document specifies: "JSON data consists of two structures: A collection of name/value pairs, called an object. An ordered list of values, called an array."

Scroll to Top