JSONデータをPOSTする javascript
JSONデータをPOSTする
POSTで JSON データを送信する時は、ふつうの POST と同様に -d オプションを使います。
リクエストヘッダに “Content-Type: application/json” を付けないとサーバが JSONと認識しない時は、-Hオプションで指定します。
curl -H  Content-Type: application/json  -d  { root :[{ title : テスト1    url :  http://examples.com/test1 }  { title : テスト2    url : http://examples.jp/test2 }]}  http://api.examples.com/postjson.php