Skip to content
Sharp

Serialization · interview question

Which option is the safer default when shipping code around json parsing?

Multiple choiceHardchapter-4-curatedpremiumserializationjson-parsing
python
import json

payload = json.loads('{"order_id":"ORD-1","subtotal":88.4}')
print(payload["order_id"], payload["subtotal"])
Choose one answer
Answer and explanation

Correct answer

D. Choose the simpler shape that keeps the rule obvious, validated, and easy to observe in logs or tests.

Why

The safest default is usually the one that lowers ambiguity and makes errors easier to diagnose.

Test yourself on Serialization

A free test with instant, explained results. No account needed.

Start free test
All Serialization questions →