org.json.JSON Exception : End of input at character 0 at
<p>Error received is "org.json.JSON Exception : End of input at character 0 at"</p>

<p>MY GET JSON Parser</p>

<pre><code>// request method is GET
            DefaultHttpClient httpClient = new DefaultHttpClient();
            String paramString = URLEncodedUtils.format(params, "utf-8");
            url += "?" + paramString;
            HttpGet httpGet = new HttpGet(url);
            HttpResponse httpResponse = httpClient.execute(httpGet);
            HttpEntity httpEntity = httpResponse.getEntity();
</code></pre>

<p>//IS is already truncated here. why?</p>

<pre><code>            is = httpEntity.getContent(); 
            String jsonString=convertStreamToString(is);
            try{
                response = new JSONObject((jsonString.substring(jsonString.indexOf("{"), jsonString.lastIndexOf("}")+1)));
            }catch (Exception e){e.printStackTrace();}
</code></pre>

<p>I receive json (which is Correct, Checked here <a href="http://jsonlint.com/" rel="nofollow">http://jsonlint.com/</a></p>

<p>Php gives following output (in browser) so it means php works fine</p>

<pre><code>{"profile":[{"image":"iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAABHNCSVQICAgIfAhkiAAAIABJREFU\neJzcvWuMZdl13\/e71ftWr9NzbnOfYRV5j9RN1mVmCNaYDKfbppFuhBE1BBNoAskhmcSxCU8cKYAB\nOxYcGwnyJbDz+pAPVvxIPkq2DMgOYFiyZXgIROCQAp0e2GN3j0Bm7sg90W17WjpXmjLPnumjPqu7\nd1flw9r7nFM9MxQp8SHnzDSq6j7OY++11+O\/\/mvtGf8\/PP78j\/8HHz95sOOLM7NPAcxi\/6mgPb+x\nDYgXts3247OHVFIWaNfThsDJCe3h4dO\/QoTN7VcpRJjBV+5GmM35iszPhy\/\/03\/xK9\/nR\/uOH7Pv\n9w38Xo8\/\/Afe9\/EHcfZDZ+c8vd3+5qcKkZX3nkoKVqsl9V5Nc9SwubkBKWhDS1FWiECzbQCh3qtR\nVTa3NogIvvRswxZfCiJCVVa0ETT2HK4ONk2z\/YqXsy\/\/2f\/qz\/zyM\/\/ZT\/4bLRT\/xgnAYS0fPJ7v\n\/pHiXPEp3OxTs0ilndKqUohABBEgKgLUezV17ekVtneCTbL31L6iVygctKEFJxCVEALeeypf......T0AAAAASUVORK5CYII=\n"}],"success":1,"message":"profile pic found"} 
</code></pre>

<blockquote>
  <p>(..... means i deleted some part of it for showing here)</p>
</blockquote>

<p>Which is correct.
But when it goes through everything 'is'=>(InputStream) get truncated to </p>

<pre><code>{"profile":[{"image":"iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAABHNCSVQICAgIfAhkiAAAIABJREFU\neJzcvWuMZdl13\/e71ftWr9NzbnOfYRV5j9RN1mVmCNaYDKfbppFuhBE1BBNoAskhmcSxCU8cKYAB\nOxYcGwnyJbDz+pAPVvxIPkq2DMgOYFiyZXgIROCQAp0e2GN3j0Bm7sg90W17WjpXmjLPnumjPqu7\nd1flw9r7nFM9MxQp8SHnzDSq6j7OY++11+O\/\/mvtGf8\/PP78j\/8HHz95sOOLM7NPAcxi\/6mgPb+x\nDYgXts3247OHVFIWaNfThsDJCe3h4dO\/QoTN7VcpRJjBV+5GmM35iszPhy\/\/03\/xK9\/nR\/uOH7Pv\n9w38Xo8\/\/Afe9\/EHcfZDZ+c8vd3+5qcKkZX3nkoKVqsl9V5Nc9SwubkBKWhDS1FWiECzbQCh3qtR\nVTa3NogIvvRs...EHoF0
</code></pre>

<blockquote>
  <p>(..... again it means i deleted some part of it for showing here)
  but it ends just there with EHoF0 (somewhere in between real full string of image</p>
</blockquote>

<p>Receiving on the android side with </p>

<pre><code>responseFromServer = JSONParser.makeHttpRequestReturnJson(url, "GET",param);
</code></pre>

<p>Checked various other question answers here but none works. I even tried POST</p>

<p>Please help!</p>