The code snippet goes like this:
Request {
//other properties
RequestList list;
//setters and geters
}
RequestList extents TypeSafeList {
add(Parent p) {
}
}
TypeSafeList extends ArrayList {
}
Parent {}
Child extends Parent {
}
While converting into json from the object is simple, but while converting it back to object, I get the object of Request, but the property list in Request class instead of having the objects of Child has linkedhashmap.
I am assuming this is because, in RequestList class, I have mentioned the parent class as method arguement, and while deserializing, it doesn't know which concrete class object it is referring to.
Any help would be appreciated.