All jobs / Mobile developer / Networking
Mobile developer interview question · 0–1 years
The backend adds a field to a response and the shipped app starts failing to parse it. What should the client have done?
The strongest answer
Ignored fields it does not know and required only the ones it uses, so a new server field is harmless — and failed loudly only when a field it needs is missing or the wrong type
Why it works
Exactly — tolerant about what you accept, strict about what you actually need. That is what lets a server move.
What a good answer covers
- Unknown fields must be harmless.
- Require only what you use.
- Ignore what you do not know.
- Fail loudly on a missing required field.
Answers that fall short
- Close, but not the strongest: Decoded into a model where every field is optional, so nothing can fail
That stops the crash but moves the problem into the UI, where every screen now has to guess what is missing. - Weak: Nothing — the backend should have versioned the endpoint before adding a field
Adding a field is a backwards-compatible change; the client that breaks on it is the part that is wrong. - Red flag: Caught the parse error and quietly shown the last cached screen so users never notice
Swallowing a parse failure means nobody learns the contract broke, and the user sees yesterday’s data as today’s.
Who gets asked this
More Networking questions
- A feed can be tens of thousands of items. How do you load it?
- A notes app edits offline and later meets a server that also changed. What do you do?
- How do you avoid re-downloading a list that rarely changes, without showing stale data for ever?
- You are choosing how a field-sales app syncs. What do you put in the design doc?
- On launch the app fires six requests at once. The access token has expired, and some users end up logged out…
- Three apps will all work offline. What do you standardise?
- The API was down for ten minutes. It fell over again the moment it returned, and the traffic was the app…