title: Convert HttpServletRequest to JSON as "UTF-8"
body: <p>I have method, which converts <code>HttpServletRequest</code> to JSON format:</p>
  
  <pre><code>public JsonObject requestToJson(HttpServletRequest request){
  
          StringBuffer jb = new StringBuffer();
          String line = null;
          try {
              BufferedReader reader = request.getReader();
              while ((line = reader.readLine()) != null)
                  jb.append(line);
          } catch (Exception e) { /*report an error*/ }
  
          return new JsonParser().parse(jb.toString()).getAsJsonObject();
      }
  </code></pre>
  
  <p>The problem is, how to convert request as "UTF-8" encoding?</p>
  
  <p><strong>UPDATED:</strong> I checked, by default reader takes request as "ISO-8859-1". How to set parameter to reader, that it took it as "UTF-8".</p>