title: Serialize JSONP/JSONPObject in Dropwizard
body: <p>I'm able to return JSON response in my Dropwizard resource without any problem. But when I tried to return a JSONPObject, the response still returns a JSON, instead of a JSON wrapped in the callback function requested.</p>
  
  <pre><code>@Path("/results")
  @Produces(MediaType.APPLICATION_JSON)
  public class ExperimentResultResource {
  
      ...
  
      @Path("results/{experimentId}")
      @GET
      @Timed
      public Object getResults(
              @PathParam("experimentId") @NotEmpty long experimentId,
              @QueryParam("callback") String callback) {
  
          ....
          ExperimentResultRepresentation representation = dataSource.queryResults(query);
          if (callback != null) {
              JSONPObject obj = new JSONPObject(callback, representation);
              return obj;
          }
          return representation;
      }
  </code></pre>
  
  <p>The good thing is that, instead of spitting out the original JSON, it did include the <code>serializationType</code> and <code>function</code> element in the JSON body:</p>
  
  <pre><code>{
      "value": { // the original JSON body }
      "serializationType": null,
      "function": "jQuery17209002291325014085_1450240336024"
  }
  </code></pre>
  
  <p>I also tried including the <code>@JSONP</code> annotation above the method as well. No luck either.</p>
  
  <p>Any idea?</p>