title: Encode Json Object Data with UTF-8 in java
body: <p>Suppose any special characters in my JSON data, they need to be encoded with UTF-8.</p>
  
  <p>Example JSON:</p>
  
  <pre><code>String msg = { \"name\": \"SÅi®äjesh\", \"location\":\"Öslö" };
  </code></pre>
  
  <p>I tried below Scenarios </p>
  
  <pre><code>byte[] utf8Bytes = msg.getBytes(StandardCharsets.UTF_8);
  String newString = new String(utf8Bytes, StandardCharsets.UTF_8);
  </code></pre>
  
  <p>/* Showing ? mark symbols in my Console */</p>
  
  <pre><code>System.out.println(URLEncoder.encode( original,StandardCharsets.UTF_8.toString() ));
  </code></pre>
  
  <p>/*  Encodes the total String including {, " etc symbols.*/ </p>