Scrivio Interview library
LeadershipPrincipal6 min read · updated 12 November 2026

Jackson has been the default JSON library in Spring for over a decade and now has a major version change. How should an organisation think about dependence on such foundational libraries?

An organisation should accept that libraries like Jackson are foundations it cannot realistically replace, because most of its code depends on them indirectly through the framework, and manage that dependence deliberately. That means keeping direct use, annotations and custom code in a small number of well-known places, following the library's releases and security advisories closely, planning major version moves together with framework upgrades, and contributing to or funding the projects it depends on most heavily.

Why this question is asked

Jackson has been under nearly every Spring application for more than ten years. Most developers never chose it; it came with the framework. A major version change like Jackson 3 makes that dependence visible: suddenly the cost of every scattered import, every custom serializer and every shortcut is a line item in a migration plan. Interviewers ask senior engineers this question to see whether they think about dependencies as a portfolio of risks rather than as things that just work. In this answer, we will look at why foundational libraries are different, how to contain their footprint, how to stay informed, how to time major upgrades, and why funding and contributing are part of the engineering strategy, not charity.

1Why Foundational Libraries Are Different

A foundational library is one that most of our code depends on, often without saying so. Jackson is a good example: our controllers use it through Spring MVC's message converters, our HTTP clients use it through RestClient or WebClient, our Kafka consumers use it through a JSON deserializer, and our caches use it through a serializer. Even a service with no Jackson import in its own code depends on it in five places.

Two things follow. First, replacing it is unrealistic: we would have to replace or reconfigure everything that uses it, and the gain rarely justifies that. Second, its problems are our problems at scale: a security flaw or a breaking change reaches every service at once. The right strategy is therefore not to avoid the dependence, but to keep it visible, contained and well maintained.

Kinds of dependency risk
KindExampleHow we manage it
Foundational, indirectJackson under Spring MVCcontain, track, upgrade with the framework
Foundational, directcustom serializers, ObjectMapper codekeep in a few shared modules
Leaf librarya PDF generator in one serviceowned by that team, replaceable
Abandoned or single maintainera small parsing libraryplan an exit or fork
The same library can sit in different rows for different parts of the codebase.

2Keeping Direct Use in a Few Places

We cannot remove the indirect dependence, but we decide how much direct code depends on the library. If every service has its own ObjectMapper configuration, its own serializers for money and ids, and Jackson annotations spread through its domain classes, then a major version change means editing hundreds of places. If the shared configuration lives in a platform starter, shared types have one module, and annotations stay on DTOs at the edge of each service rather than in the domain model, then the same change is a platform release and a few imports per service.

This is not the same as hiding Jackson behind our own JSON abstraction. A home-made wrapper around a mature library tends to become a worse copy of it, and teams work around it. The goal is fewer touch points, not a new layer: use Jackson directly, but in the places designed for it.

Java
// Spread out: every service, many places
@Entity class Order { @JsonProperty("order_id") Long id; ... } // annotations in the domain model
new ObjectMapper().registerModule(new JavaTimeModule()) // ad hoc mappers in services
class MoneySerializer extends StdSerializer<Money> { ... } // copied into 30 repositories
// Contained: a few known places
platform-json-starter -> customizers, shared modules (money, ids, dates)
service/api/dto/*.java -> records for the HTTP edge, annotations only where needed
service/domain/*.java -> no Jackson imports at all

3Following Releases and Security Advisories

Foundational libraries have a history worth remembering. Between roughly 2017 and 2020, jackson-databind received a long series of security advisories about polymorphic deserialization: applications that let JSON choose which class to create could be made to instantiate dangerous classes, known as gadgets. Each new gadget meant a patch release that every service had to pick up. Organisations that could ship a dependency update across the fleet in days were fine; those that needed months carried known vulnerabilities for months.

So following the library is an operational capability. We generate a software bill of materials for every build, so we can answer which services use jackson-databind 2.x below a given version within minutes. A bot such as Dependabot or Renovate proposes updates, and the platform's dependency management (a BOM, usually inherited from Spring Boot's) lets most services take a fix by bumping one version. Someone on the platform team reads the release notes of the few foundational libraries and turns them into short guidance for teams.

4Timing Major Versions With the Framework

A foundational library's major version usually arrives together with a framework major version, as Jackson 3 does with Spring Boot 4. Moving the library on its own means fighting the framework's integration, and moving the framework without the library means a transition mode with an end date. Doing both together means one migration, one testing effort and one round of communication with API clients.

This also shapes our roadmap. Knowing that a framework major release is coming, we can prepare before it lands: add golden-file tests for JSON output, remove ad hoc mappers, and move scattered serializers into the platform. When the upgrade arrives, the work that remains is mostly mechanical.

Step throughDeciding how to treat a foundational dependency
  1. Does most code depend on it indirectly?
    YesTreat it as foundationalNoTreat it as a team-owned leaf
  2. Contain direct useplatform modules, DTOs at the edge
  3. Track itSBOM, update bot, advisories, release notes
  4. Plan majors with the frameworkgolden files ahead, one migration
  5. Is the project under-resourced?
    YesFund it or give engineering timeNoKeep contributing fixes upstream

5 steps in order. Play them, or step through them one at a time.

5Contributing to and Funding What We Depend On

Many foundational open-source libraries are maintained by a small number of people. If our business depends on one, its maintainers' capacity is part of our risk. Contributing is the most direct help: when our engineers find a bug, they send the fix and the test upstream instead of keeping a local patch, which also means we do not carry that patch through every upgrade. Testing release candidates against our golden files and reporting problems early is a contribution maintainers value highly.

Funding is the other half. Organisations can sponsor maintainers directly, pay for commercial support or subscriptions that pass money to maintainers, or give an engineer dedicated time to work on the project. Compared with the cost of one fleet-wide security incident or a migration we could not plan, these are small amounts. The decision belongs in the same budget conversation as cloud spend and tooling, because it buys the same thing: reliability of something we cannot run without.

6Follow-up questions

Should we wrap Jackson behind our own JSON interface to be independent of it?

Usually not. Spring, client libraries and integrations use Jackson directly, so the wrapper would only cover our own calls, and it tends to fall behind the library's features. Containing direct use in a few shared modules gives most of the benefit at a fraction of the cost.

How do we know which services are exposed when an advisory appears?

From the software bill of materials produced by every build, or from a dependency report collected centrally. The question which services run jackson-databind below version X should be answerable in minutes, and the fix should be a version bump in a shared BOM that services pick up automatically.

How would you justify funding an open-source project to leadership?

By framing it as risk reduction for a dependency the business already relies on: list the services that depend on it, the cost of the last incident or migration it caused, and the size of the maintainer team. Against that, a sponsorship or an engineer's part-time contribution is a small, predictable cost.

7Conclusion

In this answer, we saw that libraries like Jackson are foundations most of our code depends on indirectly, so replacing them is unrealistic and their problems reach every service at once. We manage that dependence by keeping direct use, annotations and custom code in a few shared places, by tracking releases and security advisories with an SBOM, update bots and central dependency management, by planning major versions together with framework upgrades, and by contributing fixes and funding the projects we rely on most.

What to say in the interviewAbout 80 seconds aloud

Open with

I'd start by accepting that Jackson is foundational: even a service with no Jackson imports uses it through Spring MVC, the HTTP clients, Kafka and caching. Replacing it isn't realistic, so the strategy is to manage the dependence, not avoid it.

Then, if they want more

First, contain the direct use. Shared configuration and serializers for common types like money and ids live in one platform starter, annotations stay on DTOs at the edge, and the domain model has no Jackson imports. That turns a major version change from hundreds of edits into a platform release and a few imports per service.

I wouldn't build our own wrapper around it, though; that usually becomes a worse copy. Second, track it closely. Jackson had a long series of polymorphic deserialization advisories a few years ago, and the organisations that coped well could find every affected service from an SBOM in minutes and ship a fix through a shared BOM in days.

Third, time major versions with the framework, like Jackson 3 with Spring Boot 4, and prepare ahead with golden-file tests. And fourth, give back: send fixes upstream instead of keeping patches, test release candidates, and fund maintainers or give engineers time, because their capacity is part of our risk. Compared with one fleet-wide incident, that's cheap.

About this answer

Last updated
12 November 2026
Versions it names
Spring Boot 4
Checked
Its structure and format are checked automatically. Use it as a carefully prepared study note: where a detail matters, confirm it against the documentation below. 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 "Jackson has been the default JSON library in Spring for over a decade and now has a...": https://scrivio-interview-library.netlify.app/spring-boot/json-serialization/362ac3a480/