QuestionQ67

Automation and Programmability

Which of the following represents the JSON encoding of a dictionary or hash?

  • A {ג€keyג€: ג€valueג€}
  • B [ג€keyג€, ג€valueג€]
  • C {ג€keyג€, ג€valueג€}
  • D (ג€keyג€: ג€valueג€)
Explanation

In JSON, a dictionary or hash is encoded as an object: a set of key-value pairs enclosed in curly braces, with each key mapped to its value using a colon. That matches option A. An array uses square brackets, and the other shown syntaxes are not valid JSON object notation.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!