HTTP JSON APIs · interview question
Why translate external JSON into boundary DTOs before domain objects?
Multiple choiceEasychapter-11-curatedpremiumhttp-json-apisjson-serialization
Answer and explanation
Correct answer
A. So wire-format quirks stay at the boundary instead of leaking into core domain code
Why
Boundary DTOs absorb naming mismatches, nullability, version drift, and unit quirks from external APIs. That keeps your domain model aligned to business meaning instead of third-party response shape.
Test yourself on HTTP JSON APIs
A free test with instant, explained results. No account needed.
More HTTP JSON APIs questions
- Why might an API client crash if JSON response shapes are not treated as strict contracts?
- Why might you choose to use an API gateway in conjunction with API versioning?
- In the context of Java's HttpClient, which method allows you to perform an asynchronous HTTP request?
- How can you ensure that a Java application using HttpClient does not suffer from resource exhaustion during network…
- Why should an API version change when a field is renamed or removed?
- Which of the following is a challenge when using URL path versioning for APIs?