我做了什么:
bin\phantomjs.exe --debug=yes js\highcharts-convert.js -host 127.0.0.1 -port 3003
curl -H "Content-Type: application/json" -X POST -d '{"infile":"{xAxis: {categories: [\"Jan\", \"Feb\", \"Mar\"]},series: [{data: [29.9, 71.5, 106.4]}]}"}' 127.0.0.1:3003
我得到了什么:
Failed rendering:
SyntaxError: Unable to parse JSON string
注意:在命令行上运行正常:
bin\phantomjs js\highcharts-convert.js -infile options.json -outfile chart.svg