200-301 · Question #1260
What is represented in line 4 within this JSON schema?
The correct answer is A. object. In a JSON schema, if line 4 represents a structure enclosed in curly braces, it signifies an object, which is an unordered collection of key-value pairs.
Question
What is represented in line 4 within this JSON schema?
Exhibits
Options
- Aobject
- Barray
- Ckey
- Dvalue
How the community answered
(53 responses)- A87% (46)
- B2% (1)
- C8% (4)
- D4% (2)
Why each option
In a JSON schema, if line 4 represents a structure enclosed in curly braces, it signifies an object, which is an unordered collection of key-value pairs.
An object in JSON is defined by curly braces (`{}`) and contains an unordered set of key-value pairs; if line 4 encapsulates such a structure, then it represents an object.
An array is enclosed in square brackets (`[]`) and represents an ordered list of values, which is different from an object's curly brace notation.
A key is a string label within an object that identifies a value, not the entire structure represented by a line.
A value is the data associated with a key or an element in an array, not the structural definition of an object itself.
Concept tested: JSON data types (object structure)
Source: https://www.json.org/json-en.html
Topics
Community Discussion
No community discussion yet for this question.

