Skip to content

Bug #416

@glascaleia

Description

@glascaleia

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions