title: My android decode doesn't work with php encode
body: <p>I'm wondering what the format of a json is suppose to be since it seems php and android has two different types.</p>
  
  <p>When encode the php, it looks like this:</p>
  
  <pre><code>{"id":8435,"name":"Sears"}
  {"id":8436,"name":"Sears Appliance Services"}
  </code></pre>
  
  <p>But when I try to decode in android. It comes out as one big string in android (because it's just viewing the source code of the php page).</p>
  
  <p>This is the code:</p>
  
  <p>Php:</p>
  
  <p>echo json_encode($results[$i]);</p>
  
  <p>Android: </p>
  
  <pre><code>url = new URL("site");
  
  String param = "arg1=" + URLEncoder.encode("value1", "UTF-8");
  
  conn = (HttpURLConnection) url.openConnection();
  conn.setDoOutput(true);
  conn.setRequestMethod("POST");
  conn.setFixedLengthStreamingMode(param.getBytes().length);
  conn.setRequestProperty("Content-Type","application/x-www-form-    urlencoded");
  PrintWriter out = new PrintWriter(conn.getOutputStream());
  out.print(param);
  out.close();
  
  InputStream is = conn.getInputStream();
  BufferedReader reader = new BufferedReader(new InputStreamReader(is));
  String s;
  while ((s = reader.readLine()) != null) {
  result += s;
  }
  
  JSONObject jObject = new JSONObject(result);
  </code></pre>