> > Turns out there is a clash between a Guice method interceptor and the > JsonView annotation. I hadn't shown the annotation above as didn't think it > was relevant. >
@GET @Path("events") @JsonView(Events.PresentationView.class) @Produces(MediaType.APPLICATION_JSON) @Metrics public Events getEvents() throws JsonProcessingException { Events events = eventsWebService.getAllEvents(); LOG.debug("JSON: {}", objectMapper.writerWithView(Events. PresentationView.class).writeValueAsString(events)); return events; } Guice overrides the method and the annotations are lost. Hence the JsonView annotation is not picked nor applied. See here: http://stackoverflow.com/questions/39454014/dropwizard-jersey-resource-jsonview-and-annotated-guice-method-interceptor -- You received this message because you are subscribed to the Google Groups "dropwizard-dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to dropwizard-dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.