Quick revision
The short answer
Maintenance mode means Gson still gets bug and security fixes but is unlikely to get large new features, such as built-in support for newer Java types. It is not an emergency, because Gson is stable and widely used, so we plan by risk instead of panicking: new code uses the company standard, usually Jackson since Spring Boot already ships it, Gson stays where it works, and we migrate shared libraries and public API boundaries first, guarding every migration with contract tests that catch differences in nulls, number formats and field order.
What to remember
In this answer, we saw that maintenance mode means fixes without big new features, a slowly growing cost rather than an emergency. We respond with a measured plan: an inventory, a policy that new code uses the company standard, usually Jackson, while working Gson code stays and is patched, early migration of shared libraries and public API boundaries because they spread the dependency and define contracts, and contract tests that catch differences in nulls, numbers and field order before clients see them.
Your turn
Answer it aloud as you would in the interview, or type your answer below. Then show one part at a time and compare.
Maintenance mode means Gson still gets bug and security fixes but is unlikely to get large new features, such as built-in support for newer Java types. It is not an emergency, because Gson is stable and widely used, so we plan by risk instead of panicking: new code uses the company standard, usually Jackson since Spring Boot already ships it, Gson stays where it works, and we migrate shared libraries and public API boundaries first, guarding every migration with contract tests that catch differences in nulls, number formats and field order.
Why this question is asked
Technology choices age. A library that was the obvious choice ten years ago can become the one that holds a platform back, and a senior engineer is expected to notice that early and respond in proportion. Gson is a good example: its maintainers say plainly that it is in maintenance mode, yet it sits in dozens of services. Interviewers ask this leadership question to hear how we turn a vague worry into a policy with priorities, costs and safety nets. In this answer, we will read what maintenance mode really means, assess the actual risk, set a policy for new and existing code, decide what to migrate first and why, and see how to migrate without breaking clients.
1What Maintenance Mode Actually Means
When a project declares maintenance mode, the maintainers are telling users what to expect: they will keep fixing bugs and security issues and keep releases working on current Java versions, but they do not plan big new features. For Gson in practice that means things like java.time types still needing hand-written adapters, and newer Java features arriving slowly or not at all, while the existing functionality keeps working.
That is very different from a project being abandoned. An abandoned library gets no security fixes, and a known vulnerability in it is a real emergency. A maintained but feature-frozen library is a slowly growing cost: each team writes its own adapters and workarounds, and the gap with the rest of the ecosystem widens a little every year.
2Assessing the Risk Without Panic
Before deciding anything, we measure. We list which services and libraries depend on Gson, directly or through other libraries, which versions they use, and how they use it. A service that serializes three internal DTOs is a different case from a shared client library that defines the JSON contract with thirty custom adapters and is used by forty services.
Then we weigh the options. Migrating everything now costs many engineer-weeks and risks subtle JSON changes that break clients, for a benefit that is mostly long-term. Doing nothing costs little today, but the dependency keeps spreading. The sensible middle is a policy that stops the spread and migrates where the risk or the cost of staying is highest.
| Usage | Risk of staying | Action |
|---|---|---|
| New code anywhere | spreads the dependency | use the company standard, Jackson |
| Shared libraries used by many services | high: forces Gson on every user | migrate first, new major version |
| Public API boundaries | high: format is a contract | migrate with contract tests |
| Internal, stable, small services | low | keep, upgrade Gson versions |
| Android or Gson-specific integrations | low to none | keep, Gson is a fine fit there |
3Setting the Policy
The policy has to be short enough that people remember it. Ours would say three things. First, new code uses the company standard JSON library, which for Spring Boot services is Jackson, because Boot already configures it for HTTP and nobody needs a second stack. Second, existing Gson usage is acceptable where it works; we keep Gson patched like any other dependency, and nobody is asked to rewrite a working service for its own sake. Third, when a team touches its JSON layer anyway, for example to add java.time support, that is the moment to move to the standard.
We back the policy with tooling rather than reminders: a dependency check in the build that warns when a module adds Gson for the first time, and a platform page explaining the standard and how to configure it. A senior person's job here is to make the right thing the easy thing.
4What to Migrate First, and Why
Shared libraries come first, because each one that uses Gson forces it into every service that depends on it, often in a different version from the service's own. Migrating one shared library can remove Gson from ten services at once. Public API boundaries come next, the places where our JSON is read by other teams or partners, because there the JSON format is a contract and the inconsistency between Gson and Jackson services is visible to clients.
Everything else follows the third rule of the policy: it migrates when the team is in that code anyway. A small internal service that will be retired next year should never be migrated at all.
- Is it new code?YesUse Jackson, the standardNoLook at the existing usage
- Is it a shared library or public API?YesPlan migration now, with contract testsNoNext check
- Is the team changing its JSON layer anyway?YesMigrate as part of that workNoKeep Gson, keep it patched
3 steps in order. Play them, or step through them one at a time.
5Migrating Without Breaking Clients
The danger in any migration is that the JSON changes silently. Gson and Jackson have different defaults: Gson omits nulls while Jackson writes them, Gson reads fields while Jackson reads getters, numbers in untyped maps come out differently, and field order can change. Each difference can break a client that was written against the old output.
So before changing anything, we record the current output of the important types as approved JSON samples, and write contract tests that compare the new output with them. We then configure Jackson to match, for example by setting the inclusion rule to NON_NULL and field visibility where needed, and only change the format deliberately, through a new API version, when there is a reason. For a shared library we release the Jackson version as a new major version with a migration note and keep patching the old one for an agreed period, so consuming teams can move on their own schedule.
6Follow-up questions
How would you convince teams who like Gson?
By not asking them to change working code. The policy only applies to new code and to code they are already changing, and the platform team provides the configured Jackson setup and examples. Most resistance disappears when the migration is cheap and the reason, one JSON stack and its defaults across the company, is clear.
When would you treat this as urgent?
If a security vulnerability appeared that maintainers did not fix, or if Gson stopped working on a Java version we must adopt. Maintenance mode makes neither likely in the short term, which is exactly why a measured plan is the right response.
What would you measure to know the plan is working?
The number of modules that depend on Gson, which should stop growing at once and then fall as shared libraries migrate, and the number of contract test failures during migrations, which tells us whether we are catching format changes before clients do.
7Conclusion
In this answer, we saw that maintenance mode means fixes without big new features, a slowly growing cost rather than an emergency. We respond with a measured plan: an inventory, a policy that new code uses the company standard, usually Jackson, while working Gson code stays and is patched, early migration of shared libraries and public API boundaries because they spread the dependency and define contracts, and contract tests that catch differences in nulls, numbers and field order before clients see them.
Open with
Maintenance mode means the Gson maintainers will keep fixing bugs and security issues but are unlikely to add large features, so things like java.time support will keep needing our own adapters.
Then, if they want more
That is a slowly growing cost, not an emergency; Gson is stable and very widely used, so I would plan by risk. First I would take an inventory of which services and libraries use Gson and how heavily.
Then I would set a simple policy: new code uses the company standard, which for Spring Boot services is Jackson because Boot already configures it; existing Gson code that works stays and is kept patched; and when a team changes its JSON layer anyway, that is when it moves.
For active migration I would start with shared libraries and public API boundaries, because a shared library pushes Gson into every service that uses it, and public APIs are where the format is a contract. The main risk in migrating is silent output changes, since Gson omits nulls, reads fields, and handles numbers differently from Jackson.
So I would capture current output as approved samples, write contract tests, configure Jackson to match, and release shared libraries as a new major version while patching the old one for a while.
About this answer
- Last updated
- 12 November 2026
- Checked
- Its structure and format are checked automatically. Use it as a carefully prepared study note: where a detail matters, confirm it against the official documentation for the version you use. What the checks cover
- Where the question comes from
- Written by Scrivio for practice. It is not taken from an interview.
Report an issue with this answer
Copy the line below and send it to the author with what you found. It carries the address of this page.
Issue with "Gson's own project page describes it as being in maintenance mode, yet dozens of your...": https://scrivio-interview-library.netlify.app/java/json-libraries/4c7d001374/