I have created a Jackson Custom Deserializer to deserialize a JSON string :
public class TestMapper extends StdDeserializer<Test> {
public TestMapper() {
this(null);
}
public TestMapper(Class<?> vc) {
super(vc);
}
@Override
public Test deserialize(JsonParser jsonParser, DeserializationContext deserializationContext) throws IOException {
I want to pass a "String argument" to the deserialize method that I want to use during deserialization. Is there a way to do that?
I'm calling the deserializer as follows in my code:
new ObjectMapper().readValue(json, Test.class)
and the Test Class is :
@JsonDeserialize(using = TestMapper.class)
public class Test {