title: decode json object sent form android app to php server
body: <p>I am sending json object from android as such:</p>
  
  <pre><code>//Create JSONObject here
                      JSONObject json = new JSONObject();
                      json.put("key", String.valueOf(args[0]));
  
                      String postData=json.toString();
  
                      // Send POST output.
                      printout = new DataOutputStream(urlConn.getOutputStream ());
                      printout.writeUTF(URLEncoder.encode(postData,"UTF-8"));
                      Log.i("NOTIFICATION", "Data Sent");
                      printout.flush ();
                      printout.close ();
  </code></pre>
  
  <p>When it is sent to the server it looks like the following code snippet. <code>???%7B%22key%22%3A%22value%22%7D</code>
  I should add the first ??? are in a diamond each. When I decode the whole json object I get null. In the php server I have </p>
  
  <pre><code>$somevar=json_decode(json, true);
  </code></pre>
  
  <p>which returns null. Can someone point me on how to retrieve the json value? Thanks so much:)</p>