Question 120
An integration feeds text/html and application/json to one parser that sometimes returns strings and sometimes dictionaries with no type marker. What design improvement is best?
Explanation
Correct Answer
Typed contracts let downstream consumers handle each representation reliably.
Incorrect Answers
Consumers cannot safely interpret an unknown representation.
Flattening loses structured semantics required by clients.
Ambiguity increases parsing errors and unsupported inferences.