200-901 Software Development and Design Practice Question
A developer is troubleshooting a Python function that parses device configuration returned by a REST API. The function receives a JSON string and must convert it into native Python dictionaries and lists before iterating over the device entries. Which standard-library approach performs that conversion?
⚠ Common exam trap
It's easy for candidates to confuse the s-suffixed string functions with the file-oriented functions, or reversing serialization and deserialization.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Call json.loads() on the response text to transform the JSON string into Python dictionaries and lists.
The json module separates file-based and string-based operations. Deserializing in-memory API text requires json.loads(), which turns JSON text into dicts, lists, strings, numbers, booleans, and None. The serializing counterpart json.dumps() moves in the other direction, and json.load() requires a file-like object rather than a string.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Call json.load() on the response text to read the JSON content directly from the string variable.
Why it's wrong here
json.load() expects a file-like object with a read() method, such as an open file handle, and will raise an AttributeError when given a plain string. The string-based counterpart is json.loads(), so this call fails for the described input.
- ✓
Call json.loads() on the response text to transform the JSON string into Python dictionaries and lists.
Why this is correct
json.loads() deserializes a JSON-formatted string into Python objects, mapping JSON objects to dicts and JSON arrays to lists. That gives the function native structures it can iterate directly, which is precisely the conversion described in the scenario.
- ✗
Call str() on the response text so Python can interpret the JSON braces and brackets as native container syntax.
Why it's wrong here
str() on an existing string returns that same string unchanged; it performs no parsing at all. Python will not reinterpret braces and brackets inside a string as containers, so the function would still hold text and could not index device entries.
- ✗
Call json.dumps() on the response text to transform the JSON string into Python dictionaries and lists.
Why it's wrong here
json.dumps() serializes Python objects into a JSON-formatted string, which is the opposite direction from what the scenario needs. Applying it to a string would produce a quoted JSON string literal rather than the nested dictionaries and lists the function must iterate over.
Go deeper
Related to this question
About these practice questions
One of 975 original 200-901 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
JA
Written and reviewed by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
Last reviewed September 2026 · checked against the official Cisco exam blueprint
This 200-901 practice question is part of Courseiva's free Cisco certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the 200-901 exam.