Closed
Description
in Dropwizard version 1.0.0-rc2 currently
dropwizard/dropwizard-core/src/main/java/io/dropwizard/server/AbstractServerFactory.java
Line 266 in 49ea3ed
| @JsonProperty("requestLog") |
In my app initialize I am doing
bootstrap.getObjectMapper().setPropertyNamingStrategy(PropertyNamingStrategy.SNAKE_CASE);
so that all jersey requests with json use snake case (which affects the configuration as well)
Metadata
Metadata
Assignees
Labels
No labels
Activity
nickbabcock commentedon May 24, 2016
The problem is that the
@JsonProperty("requestLog")is needed, else it won't be de/serialized correctly because the property is named differently than what would be auto-detected.And unfortunately the naming strategy only works in:
If there was a way to get the snake casing to work universally without breaking backwards compatibility, I would support that (have you tried mixins?)
camerondavison commentedon May 24, 2016
Ah, I think because of 05d3fcd I thought that this was new. This problem has been around for a while. Maybe you could do something like
making it package local, so that jackson could use it, but not breaking any other people that are using the java apis.
nickbabcock commentedon Sep 25, 2016
In the boostrapper you should be able to enable a feature on the mapper that allows for naming strategy to override the
JsonPropertyFrom the javadocs: