File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
src/test/java/tools/jackson/databind/misc Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change 88import tools .jackson .databind .DeserializationFeature ;
99import tools .jackson .databind .MapperFeature ;
1010import tools .jackson .databind .ObjectMapper ;
11+ import tools .jackson .databind .introspect .DefaultAccessorNamingStrategy ;
1112import tools .jackson .databind .json .JsonMapper ;
1213import tools .jackson .databind .testutil .DatabindTestUtil ;
1314
@@ -22,14 +23,12 @@ static class TestPojo {
2223 private String aProp ;
2324 private String anotherProp ;
2425
25- // Needed in 3.0 due to incompatible naming
26- @ JsonProperty ("aProp" )
26+ // NOTE: non-compliant naming; see JsonMapper configuration
2727 public String getaProp () {
2828 return aProp ;
2929 }
3030
31- // Needed in 3.0 due to incompatible naming
32- @ JsonProperty ("aProp" )
31+ // NOTE: non-compliant naming; see JsonMapper configuration
3332 public void setaProp (String aProp ) {
3433 this .aProp = aProp ;
3534 }
@@ -49,6 +48,8 @@ public void featureEnabledTest()
4948 ObjectMapper mapper = JsonMapper .builder ()
5049 .disable (DeserializationFeature .FAIL_ON_UNKNOWN_PROPERTIES )
5150 .enable (MapperFeature .FIX_FIELD_NAME_UPPER_CASE_PREFIX )
51+ .accessorNaming (new DefaultAccessorNamingStrategy .Provider ()
52+ .withFirstCharAcceptance (true , false ))
5253 .build ();
5354
5455 String json = "{\" aProp\" :\" aPropValue\" ,\" prop1\" :\" prop1Value\" }" ;
You can’t perform that action at this time.
0 commit comments