title: PHP Curl Post - JSON Decoding Error
body: <p>I need to use PHP curl to post JSON data. After searching this site, I found some examples and learned that data should be submitted as array, but I still get "({"message":"cjson decoding error","code":500,"error":true})" error every time after posting data.</p>
  
  <p>The original data looks like this (from firefox live httpd headers):</p>
  
  <pre><code>{"nodes":[{"id":"","type":"some_type","parentId":"ROOT","refId":null,"href":"","text":"New","desc":"","tags":"","cr":123}],"revision":11,"token":"some_token"}
  </code></pre>
  
  <p>Now, here's the data I try to submit via curl</p>
  
  <pre><code>json_encode(array("nodes"=&gt;array("id"=&gt;"", "type"=&gt;"some_type", "parentId"=&gt;"ROOT", "refId"=&gt;"", "href"=&gt;"", "text"=&gt;"New", "desc"=&gt;"", "tags"=&gt;"", "cr"=&gt;"123"), "revision"=&gt;"11", "token"=&gt;"some_token"));
  </code></pre>
  
  <p>Could someone tell me what's wrong here?</p>