I'm using a file containing JSON to configure the internals of my application. I'd like to be able to configure my values with, say, system properties and do variable substitution on them when unmarshalling the JSON.
The templating portion I have written it wasn't a big deal. What I'm trying to figure out is the best way to plug it in to my ObjectMapper.
From looking around, I think the best place would be in a JsonParser.getText method, but I can't seem to find any sane way to do this.
Here's a snippet example of what I'm trying to do. Basically I need to resolve the property before it gets deserialized.
I throw the Path example in there because previously I was naively performing this on the setters of the POJO which caused the JDK7Module's Path deserialization to lose its mind (it didn't like the :)
[
{ "name": "${sys:NAME}",
"path": "${sys:ROOT}"
}
]