title: force json from jersey response
body: <p>I am trying to implement this <a href="https://github.com/blueimp/jQuery-File-Upload/issues/425" rel="nofollow">example</a>.  The first method in FileResource is supposed to return a json response, but the response is coming through as XML.  I have never used jersey before.  I tried adding @produces yielding this:</p>
  
  <pre><code>@GET @Produces("application/json")
  @Path("/url")
  public Response getCallbackUrl() {
      String url = blobstoreService.createUploadUrl("/rest/file");
      return Response.ok(new FileUrl(url)).build();
  }
  </code></pre>
  
  <p>Now I'm getting</p>
  
  <pre><code>A message body writer for Java class FileUrl, and Java type class FileUrl, and MIME media type application/json was not found
  </code></pre>
  
  <p>How can I fix this? Thanks for any help. And if you need any more info let me know.  I don't know much of the jersey terminology.  </p>