Skip to content
Sharp

HTTP JSON APIs · interview question

How can you ensure an API client handles unexpected additional fields in a JSON response?

Multiple choiceMediumchapter-11-curatedpremiumhttp-json-apisapi-versioning
Choose one answer
Answer and explanation

Correct answer

B. Design the client to ignore unknown fields.

Why

Designing the client to ignore unknown fields allows it to handle unexpected additions gracefully, preventing crashes and maintaining forward compatibility.

Test yourself on HTTP JSON APIs

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

Start free test
All HTTP JSON APIs questions →