Hello !
I have a requirement where I need to select the concrete class based on presence of a key field in my json
I have a base abstract class Activity.java which is extended by CommandActivity.java and ViewActivity.java
Ex -
=====
Json 1
{
"command" : "abc"
"parameters" : ["ls"]
"user" : "iamuser1"
"origin" : "asia"
}
Json2
{
"view" : "C001"
"resource":"XYZ"
"user" : "iamuser2"
"origin" : "US"
}
Based on presence of key command or view, jackson needs to select the right concrete class for deserizliation.
Wondering if this feature is available already in the framework? If someone had similar problem solved earlier, would be awesome if you can share the code snippet
Cheers
Reji