Which answers refer to JSON values rather than JSON keys as found in the sample JSON data? (Choose two answers.)

IT Questions BankCategory: CCNAWhich answers refer to JSON values rather than JSON keys as found in the sample JSON data? (Choose two answers.)

Which answers refer to JSON values rather than JSON keys as found in the sample JSON data? (Choose two answers.)

{
	"response": {
		"type": "Cisco Catalyst 9300 Switch",
		"family": "Switches and Hubs",
		"role": "ACCESS",
		"managementIpAddress": "10.10.22.66"
	}
}
  • “response”
  • “type”
  • “ACCESS”
  • The entire gray area

Explanation: To interpret this JSON data, first look for the innermost pairing of either curly brackets { }, which denote one object, or square brackets [ ], which denote one array. In this case, the gray highlighted area is one JSON object, enclosed with { } and no other brackets of either type inside. That makes the gray area one object, which itself holds key:value pairs.
Inside that one object, four key:value pairs exist, with the key before each colon and the value after each colon. That means “type” is a key, and “ACCESS” is one of the values.
If you look at the other pair of curly brackets that begin and end the JSON data, that pair defines an object. That object has a key of “response” (making one answer incorrect). The “response” key then has a value equal to the entire inner object (the gray highlighted part), confirming one of the correct answers.

Subscribe
Notify of
guest

0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x