title: Servlet JSON response ENCODING issue For "="
body: <p>I have simple JSON Object as follows :</p>
  
  <pre><code>{"status":"Success","action":"Redirect","sessionid":6467349943156736,"url":"https://myapplicationing.com/go?id=1000"}
  </code></pre>
  
  <p>i have created JSON as follows:</p>
  
  <pre><code>JSONObject json = new JSONObject();
  json.put("status", "Success");
  json.put("action", "Redirect");
  json.put("sessionid", "6467349943156736");
  json.put("url", "https://myapplicationing.com/go?id=1000");
  </code></pre>
  
  <p>when i write this json as response </p>
  
  <pre><code>resp.setContentType("application/json");        
          resp.setHeader("Cache-Control", "no-cache");
          resp.setCharacterEncoding("utf-8");
          try {
  //           json.write(resp.getWriter());//[tried]
  //          Gson gson = new GsonBuilder().disableHtmlEscaping().create();
              resp.getWriter().println(json.toString());
  //          resp.getWriter().println(gson.toJson(json));//[TRIED]
          } catch (Exception e) {
              e.printStackTrace();
          }
  </code></pre>
  
  <p>But it is still giving me JSON string as follows :</p>
  
  <pre><code>{"status":"Success","action":"Redirect","sessionid":6467349943156736,"url":"https://myapplicationing.com/go?id\u003d1000"}
  </code></pre>
  
  <p>Here why it is <code>ENCODING</code> JSON String.
  It is replacing "=" to "\u003d".</p>
  
  <p>I have tried  this one :</p>
  
  <pre><code>Gson gson = new GsonBuilder().disableHtmlEscaping().create();
  resp.getWriter().println(gson.toJson(json));
  </code></pre>
  
  <p>But not working. Any Solution on this.</p>