nerdexam
Cisco

200-901 · Question #423

What is used in JSON to represent a Python tuple?

The correct answer is C. array. JSON has no native tuple type. Since a Python tuple is an ordered, immutable sequence of values, it maps to a JSON array ([ ]) when serialized. The json module in Python automatically converts both lists and tuples to JSON arrays. JSON objects ({}) represent key-value mappings…

Software Development and Design

Question

What is used in JSON to represent a Python tuple?

Options

  • Acollection
  • Bobject
  • Carray
  • Ddict

How the community answered

(26 responses)
  • A
    4% (1)
  • B
    8% (2)
  • C
    88% (23)

Explanation

JSON has no native tuple type. Since a Python tuple is an ordered, immutable sequence of values, it maps to a JSON array ([ ]) when serialized. The json module in Python automatically converts both lists and tuples to JSON arrays. JSON objects ({}) represent key-value mappings (like Python dicts), not ordered sequences.

Topics

#JSON#Python#Data Structures#Serialization

Community Discussion

No community discussion yet for this question.

Full 200-901 Practice