-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Closed
Milestone
Description
I originally came across this issue using Dropwizard - dropwizard/dropwizard#1095. But it looks like this is a Jackson issue. Here's the rerproducer:
public class TestPropertyNamingStrategyIssue {
public static class ClassWithObjectNodeField {
public String id;
public ObjectNode json;
}
@Test
public void reproducer() throws Exception {
ObjectMapper mapper = new ObjectMapper();
mapper.setPropertyNamingStrategy(PropertyNamingStrategy.LOWER_CASE);
ClassWithObjectNodeField deserialized =
mapper.readValue(
"{ \"id\": \"1\", \"json\": { \"foo\": \"bar\", \"baz\": \"bing\" } }",
ClassWithObjectNodeField.class);
}
}
Looks like the presence of any PropertyNamingStrategy make deserialization to ObjectNode fail. This works fine if I remove the property naming strategy.
Metadata
Metadata
Assignees
Labels
No labels