Great thanks. That sounds on the lines of what I need.
But its not clear exactly how to got about this - where to set the Attributes so that they can are visible to the deserializer.
So, given code like this:
ObjectMapper mapper = new ObjectMapper();
SimpleModule module = new SimpleModule();
module.addDeserializer(MyClass.class, new MyClassDeserializer());
mapper.registerModule(module);
JsonParser parser = mapper.getFactory().createParser(someJson);
MyClass my = parser.readValueAs(MyClass.class);
How do I specify attributes so that they are visible to the deserializer in a thread safe manner,
I'm presumably not wanting to create a new ObjectMapper every time as that's a relatively expensive operation, so it needs to happen after module registration?
Thanks
Tim