Which answers correctly describe the format of the JSON text below? (Choose two answers.)

IT Questions BankCategory: CCNAWhich answers correctly describe the format of the JSON text below? (Choose two answers.)

Which answers correctly describe the format of the JSON text below? (Choose two answers.)
{ "myvariable":[1,2,3] }

  • One JSON object that has one key:value pair
  • One JSON object that has three key:value pairs
  • A JSON object whose value is a second JSON object
  • A JSON object whose value is a JSON array

Explanation: JSON defines variables as key:value pairs, with the key on the left of the colon (:) and always enclosed in double quotation marks, with the value on the right.
The value can be a simple value or an object or array with additional complexity. The number of objects is defined by the number of matched curly brackets ({ and }), so this example shows a single JSON object.
The one JSON object shown here includes one key and one :, so it has a single key:value pair (making one answer correct). The value in that key:value pair itself is a JSON array (a list in Python) that lists numbers 1, 2, and 3. The fact that the list is enclosed in square brackets defines it as a JSON array.

Subscribe
Notify of
guest

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