nerdexam
Cisco

200-901 · Question #9

Refer to the exhibit. Which Python data structure does my_json contain?

The correct answer is D. Dict. When Python's json.loads() (or equivalent) parses a JSON object (curly-brace {} structure), it produces a Python dictionary (dict). Although the variable is named my_json, the name is misleading - after parsing, the value is a native Python dict, not a JSON string. 'JSON' (B)…

Software Development and Design

Question

Refer to the exhibit. Which Python data structure does my_json contain?

Exhibit

200-901 question #9 exhibit

Options

  • AList
  • BJson
  • CMap
  • DDict

How the community answered

(53 responses)
  • A
    2% (1)
  • B
    2% (1)
  • C
    4% (2)
  • D
    92% (49)

Explanation

When Python's json.loads() (or equivalent) parses a JSON object (curly-brace {} structure), it produces a Python dictionary (dict). Although the variable is named my_json, the name is misleading - after parsing, the value is a native Python dict, not a JSON string. 'JSON' (B) is a serialization format, not a Python data structure. A Python list (A) would result from parsing a JSON array ([]). map (C) is either a Python built-in function or a lazy iterator, not a data structure produced by JSON parsing.

Topics

#JSON#Python Data Types#Data Serialization#Dictionaries

Community Discussion

No community discussion yet for this question.

Full 200-901 Practice