Question
In Python, which comparison about JSON Serialization vs pickle is accurate?
- There is no practical difference in behavior, performance, or maintainability when JSON Serialization vs pickle is involved.
- JSON is stronger for cross-system contracts and untrusted boundaries, while pickle is more coupled to Python object semantics and trust assumptions.
- The oldest option related to JSON Serialization vs pickle is always the right production choice regardless of workload or context.
- Differences around JSON Serialization vs pickle are mostly cosmetic, so correctness and debugging quality do not really change.
Hint
Focus on the behavior or tradeoff, not just the keyword.
Answer and rationale
Correct answer: B. JSON is stronger for cross-system contracts and untrusted boundaries, while pickle is more coupled to Python object semantics and trust assumptions.
JSON is stronger for cross-system contracts and untrusted boundaries, while pickle is more coupled to Python object semantics and trust assumptions. This is the comparison that usually separates memorization from understanding.
Track: Python