Is it possible to serialize/deserialize Map where type of object (mapped value) would be determined by its key.
{
\"nu
Yes, it could be done.
Have another structure that contains a pair of Map and link the key name of the first structure (Map) to the second one.
For example
Map map = new HashMap();`
map.put("desc", "something really important");
Map deser = new HashMap();
deser.put("desc", StringDeserializer.class);
You could also use a deser, where the value would be the class name, then you just do a class loading by name http://www.tutorialspoint.com/java/lang/class_forname_loader.htm