Skip to content
Sharp

HTTP JSON APIs · interview question

When adding a new field to a JSON API response, which of the following strategies is the safest for backward compatibility?

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

Correct answer

D. Add the field without changing the API version.

Why

Adding a new field to a JSON response without removing existing fields ensures backward compatibility because existing clients can ignore the new field without needing code changes.

Test yourself on HTTP JSON APIs

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

Start free test
All HTTP JSON APIs questions →