title: conversion from string to JSON object Android
body: <p>I am working on an Android application. In my app I have to convert a string to JSON Object, then parse the values. I checked for a solution in Stackoverflow and found similar issue here <a href="https://stackoverflow.com/questions/5245840/how-to-convert-string-to-jsonobject-in-java">link</a></p>
  <p>The solution is like this</p>
  <pre><code>       `{&quot;phonetype&quot;:&quot;N95&quot;,&quot;cat&quot;:&quot;WP&quot;}`
          JSONObject jsonObj = new JSONObject(&quot;{\&quot;phonetype\&quot;:\&quot;N95\&quot;,\&quot;cat\&quot;:\&quot;WP\&quot;}&quot;);
  </code></pre>
  <p>I use the same way in my code . My string is</p>
  <pre><code>{&quot;ApiInfo&quot;:{&quot;description&quot;:&quot;userDetails&quot;,&quot;status&quot;:&quot;success&quot;},&quot;userDetails&quot;:{&quot;Name&quot;:&quot;somename&quot;,&quot;userName&quot;:&quot;value&quot;},&quot;pendingPushDetails&quot;:[]}
  
  string mystring= mystring.replace(&quot;\&quot;&quot;, &quot;\\\&quot;&quot;);
  </code></pre>
  <p>And after replace I got the result as this</p>
  <pre><code>{\&quot;ApiInfo\&quot;:{\&quot;description\&quot;:\&quot;userDetails\&quot;,\&quot;status\&quot;:\&quot;success\&quot;},\&quot;userDetails\&quot;:{\&quot;Name\&quot;:\&quot;Sarath Babu\&quot;,\&quot;userName\&quot;:\&quot;sarath.babu.sarath babu\&quot;,\&quot;Token\&quot;:\&quot;ZIhvXsZlKCNL6Xj9OPIOOz3FlGta9g\&quot;,\&quot;userId\&quot;:\&quot;118\&quot;},\&quot;pendingPushDetails\&quot;:[]}
  </code></pre>
  <p>when I execute <code>JSONObject jsonObj = new JSONObject(mybizData);</code></p>
  <p>I am getting the below JSON exception</p>
  <blockquote>
  <p>org.json.JSONException: Expected literal value at character 1 of</p>
  </blockquote>
  <p>Please help me to solve my issue.</p>