title: php json_encode single item numeric array
body: <p>When I do <code>json_encode</code> from this array:</p>
  
  <pre><code>array('aps' =&gt; array(
                       'alert' =&gt; array(
                                       'param1'=&gt;array('string'), 
                                       'param2'=&gt;'string' )));
  </code></pre>
  
  <p>I'm getting this JSON object:</p>
  
  <pre><code>{
      "aps" :    {
        "alert" :         {
              "param1" :             {
                  "0" : "string"
              },
              "param2" : "string"
          }
      }
  }
  </code></pre>
  
  <p>Instead of</p>
  
  <pre><code>{
      "aps" :    {
        "alert" :         {
              "param1" :             
                  ["string"],
  
              "param2" : "string"
          }
      }
  }
  </code></pre>
  
  <p>It seems to work right when the <code>param1</code> array is not a single item. 
  How could I fix it? The Json is created from a third party bundle, so I should format the array in PHP so that I could get the correct JSON on <code>json_encode</code> (<code>param1</code> as a list).</p>