You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a classic use case of converting a map to JSON. The only catch here is the Map's value is instance of sub classses of an abstract class. Refer to following code:
public Map<String, JsonAbstractClassB> jsonMap;
where JsonAbstractClassB has two different sub classes JsonClassC and JsonClassD.
While setting the object of class C and class D and serializing works perfectly fine. When I deserialize a json back. All I get is instance of JsonAbstractClassB. Boon does not return me the instance of JsonClassC and JsonClassD.
and could see that if the object of abstract classes and sub classes are not wrapped in a collection, they work perfectly fine during deserialization but not when wrapped in collection.
Any help is highly appreciated.
The text was updated successfully, but these errors were encountered:
I have a classic use case of converting a map to JSON. The only catch here is the Map's value is instance of sub classses of an abstract class. Refer to following code:
public Map<String, JsonAbstractClassB> jsonMap;
where JsonAbstractClassB has two different sub classes JsonClassC and JsonClassD.
While setting the object of class C and class D and serializing works perfectly fine. When I deserialize a json back. All I get is instance of JsonAbstractClassB. Boon does not return me the instance of JsonClassC and JsonClassD.
I was referring to the example https://github.com/boonproject/boon/wiki/Boon-JSON-in-five-minutes#subclasses-interfaces-and-abstract-classes
and could see that if the object of abstract classes and sub classes are not wrapped in a collection, they work perfectly fine during deserialization but not when wrapped in collection.
Any help is highly appreciated.
The text was updated successfully, but these errors were encountered: