title: Passing string to a REST API that consumes application/json
body: <p>I have an interface that looks something like this:</p>
  
  <pre><code>@Path("/myapi")
  @Produces("application/json")
  @Consumes("application/json")
  public interface MyRestApi {
  
      /// Some methods here that accept complex object and work fine
  
      @GET
      @Path("/methodwithstring")    
      public void methodWithString(final String thumbprint,
          @Context final HttpServletResponse response);
  
  
  }
  </code></pre>
  
  <p>When I pass a string to the <code>methodWithString</code>method we get a string that looks like this <strong>"some-string"</strong>. The problem is the quotes, the string arrives to the method surrounded with ". I would like to understand how can I pass it without the surrounding ".</p>
  
  <p>I guess that happens because the class consumes "application/json". That's the first time we pass a string as a parameter and we don't know how to work around this issue.</p>