title: strange behavior json_decode
body: <p>I'm creating a json in javascript in that way</p>
  
  <pre><code>jsonArr.push({
              position: 'WN',
              wind: windWN,
              wave: waveWN,
              sea:  seaWN
          });
          var myJsonString = JSON.stringify(jsonArr);
  </code></pre>
  
  <p>I'm sending it via an AJAX method with jsonData: <code>jsonData:Ext.encode(myJsonString)</code></p>
  
  <p>My json array looks like that when I send it : 
  <img src="https://i.stack.imgur.com/Otddf.png" alt="enter image description here"></p>
  
  <p>In PHP side, I'm getting the Json and decoding it that way :</p>
  
  <pre><code>$rawpostdata = file_get_contents("php://input");
  $rawpostdata2 = json_decode($rawpostdata, true); 
  </code></pre>
  
  <p>I tried <code>print_r( $rawpostdata2[1]);</code> and got '{', as the second character of the "string", and I can't understand why.</p>
  
  <p>In the other side, I tried <code>print_r($rawpostdata)</code>, cut/past the result in a $string and retest my json_decode like that : </p>
  
  <pre><code>$rawpostdata = file_get_contents("php://input");
  // print_r($rawpostdata);
  $string = '[{"position":"N","wind":"2","wave":"65","sea":"65"},{"position":"E","wind":"3","wave":"5","sea":"6"},{"position":"S","wind":"56","wave":"4","sea":"8"},{"position":"W","wind":"1","wave":"56","sea":"84"},{"position":"NE","wind":"5","wave":"6","sea":"65"},{"position":"ES","wind":"6","wave":"45","sea":"6"},{"position":"SW","wind":"69","wave":"8","sea":"4"},{"position":"WN","wind":"7","wave":"8","sea":"56"}]';
  $rawpostdata2 = json_decode($string,true); 
  print_r ($rawpostdata2[1]);
  </code></pre>
  
  <p>It gives me the correct result !</p>
  
  <blockquote>
    <p>Array (
        [position] => E
        [wind] => 3
        [wave] => 5
        [sea] => 6 )</p>
  </blockquote>
  
  <p>Do you have some explanations? </p>
  
  <p><strong>EDIT :</strong> I make it working by making another json_decode</p>
  
  <pre><code>$rawpostdata = file_get_contents("php://input");
  $rawpostdata2 = json_decode($rawpostdata,true); 
  $rawpostdata3 = json_decode($rawpostdata2,true);
  </code></pre>
  
  <p>But I don't really understand...</p>