title: How to return a string in response that have @Produces(MediaType.APPLICATION_JSON)?
body: <pre><code>@GET
  @Path("/paises/{id}")
  @Produces(MediaType.APPLICATION_JSON)
  public Response findCuntryList(@PathParam("id")int id){
      try{
      ArrayList&lt;Country&gt; lista = new ArrayList&lt;&gt;();
      for(int i=0; i&lt;10 ;i++){
          Country c = new Country();
          c.setId(i);
          c.setName("country"+i);
          c.setCode("countryIsoCode"+i);
          c.setRegion("region"+i);
          lista.add(c);
          }
  
      Country co = lista.stream().filter(x -&gt; x.getId()==id).findAny().get();
      if(id &gt; lista.size()-1) throw new Exception("That id is not correct");
      return Response.ok(co).build();
      }catch(Exception e){
  
          return Response.status(404).entity(e.getMessage()).build();
          }
      }
  </code></pre>
  
  <p>I wanna return a json when i don't have a Exception but when i have it i need to return a string with the exception message but this drop error of json parse.</p>