200-301 · Question #1131
Refer to the exhibit. In which structure does the word "warning" directly reside?
The correct answer is A. array. Within a JSON structure, if 'warning' is an element in an ordered collection of values, it directly resides within an array.
Question
Exhibits
Options
- Aarray
- Bobject
- CBoolean
- Dstring
How the community answered
(35 responses)- A94% (33)
- C3% (1)
- D3% (1)
Why each option
Within a JSON structure, if 'warning' is an element in an ordered collection of values, it directly resides within an array.
In JSON, an array is an ordered list of values, enclosed in square brackets `[]`. If the word 'warning' appears as a direct value within these brackets (e.g., `["info", "warning", "error"]`), it directly resides in an array.
An object in JSON is an unordered collection of key-value pairs enclosed in curly braces `{}`. If 'warning' were a key or a value associated with a key (e.g., `{"level": "warning"}`), it would reside in an object, but not directly as a standalone string element unless it was a key itself.
Boolean values in JSON are `true` or `false` and do not contain other words like 'warning'.
While 'warning' is itself a string, the question asks in which *structure* it directly resides, implying it's contained within something larger than just itself if it's the entire document.
Concept tested: JSON array structure and elements
Source: https://www.json.org/json-en.html
Topics
Community Discussion
No community discussion yet for this question.

