Skip to content

sunilpulugula/JacksonPolymorphicDeserialization

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

#Polymorphic deserialization using deserilizer :

If Interface or abstract class have multiple implementation and try to deserialize any implementation with Interface then you will find below error

Can not construct instance of com.MyInterface, problem: abstract types either need to be mapped to concrete types, have custom deserializer, or be instantiated with additional type information

To overcome this error,You could write a custom deserializer for Interface or abstract class, which would have to programmatically parse the JSON depending on the fields and parse the body as whatever concrete class you had in mind.

This project will explaing how to create deserilizer for polymorphic types.

About

Jackson de-serialization for polymorphic types

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages