nerdexam
Cisco

200-301 · Question #147

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

The correct answer is A. {"key": "value"}. In JSON (JavaScript Object Notation), a dictionary or hash is represented as an object, which is enclosed in curly braces and contains key-value pairs where keys are strings.

Submitted by khalil_dz· Mar 5, 2026

Question

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

Options

  • A{"key": "value"}
  • B["key", "value"]
  • C{"key", "value"}
  • D("key": "value")

How the community answered

(18 responses)
  • A
    89% (16)
  • B
    6% (1)
  • D
    6% (1)

Why each option

In JSON (JavaScript Object Notation), a dictionary or hash is represented as an object, which is enclosed in curly braces and contains key-value pairs where keys are strings.

A{"key": "value"}Correct

In JSON, a dictionary or hash is represented as an object, which is enclosed within curly braces `{}` and consists of one or more key-value pairs where the keys are strings enclosed in double quotes, such as `{"key": "value"}`.

B["key", "value"]

This represents a JSON array, which is an ordered list of values, not a dictionary or hash.

C{"key", "value"}

This is invalid JSON syntax for an object; key-value pairs must be separated by a colon (`:`), not just a comma (`,`).

D("key": "value")

This uses parentheses `()` instead of curly braces `{}`, which is not the correct syntax for defining a JSON object.

Concept tested: JSON object syntax

Source: https://learn.microsoft.com/en-us/azure/iot-hub/iot-hub-devguide-messages-json-format

Topics

#JSON syntax#JSON objects

Community Discussion

No community discussion yet for this question.

Full 200-301 Practice