ARTICLE AD BOX
In my Java application I had the requirement to implement a "hierarchical HashMap", meaning: I have a hierachy of HashMaps (each containing name-value pairs) which are connected in a tree-like fashion and behave such, that if a key is not found in the local map, they check for that key in their "parent-map" (recursively up to a root-map) and - if they find one, they provide that "upper" map's value.
Back then I decided to use "java.util.Properties" (or to be precise: a class deriving from Properties) for that purpose since these implement exactly such a map-hierachy: when creating a new Properties-instance you can provide a parent-Properties-instance.
I am (de-)serializing these properties to/from JSON using the com.fasterxml.jackson(.databind)-library (com.fasterxml.jackson.databind.json.JsonMapper). This had worked without any issue with Jackson v2, but now I just upgraded to Jackson v3 and with that version the deserialization of Properties fails. :-(
When trying to reading JSON files created by the earlier version I keep getting errors:
Note: class NodeProperties is a simple class that derives from java.util.Properties like so:
public class NodeProperties extends Properties { ... }and simply adds a few additional operations I needed for my name-value-pair hierachies.
Any idea anyone, why Jackson's deserialization of java.util.Properties fails in version 3.x? Is that expected behavior? Is there now some flag or helper required for this?
