Skip to content
Sharp

Networking · interview question

How would you explain a common issue when using ObjectMapper to deserialize nested JSON objects into Java classes in an interview?

Multiple choiceHardchapter-11-curatedpremiumnetworkinghttpclient-basics
Choose one answer
Answer and explanation

Correct answer

C. Missing type information for polymorphic types

Why

When deserializing JSON into polymorphic types, ObjectMapper requires additional type information to correctly instantiate the appropriate subclass. This is often done using annotations or configuration to include type metadata in the JSON.

Test yourself on Networking

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

Start free test
All Networking questions →