-
-
Notifications
You must be signed in to change notification settings - Fork 819
Description
Hi All i have this situation.
My Bean
@JsonRootName(value = "test")
public class TestBean implements ITestBean {
private Map<String, Object> values;
//get and set
}
@JsonDeserialize(as = TestBean.class)
public interface ITestBean {
Map<String, Object> getValues();
void setValues(Map<String, Object> theValues);
}
If i tried to use ObjectMaper and deserialize this code i have error :
ITestBean testBean = objectMapper.readValue(new StringReader("{
"test" :
"values" : {
"value1" : "test",
"value" : true
}
}
}"), ITestBean.class);
The error is :
java.util.MissingFormatArgumentException: Format specifier '%s'
at java.util.Formatter.format(Formatter.java:2519)
at java.util.Formatter.format(Formatter.java:2455)
at java.lang.String.format(String.java:2940)
at com.fasterxml.jackson.databind.DatabindContext._format(DatabindContext.java:326)
at com.fasterxml.jackson.databind.DeserializationContext.reportInputMismatch(DeserializationContext.java:1341)
at com.fasterxml.jackson.databind.ObjectMapper._unwrapAndDeserialize(ObjectMapper.java:4076)
at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:3999)
at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3037)
Regards Giuseppe