Javascript 无法使用highcharts分析JSON字符串,正在导出windows phantomjs版本的服务器
我所做的:Javascript 无法使用highcharts分析JSON字符串,正在导出windows phantomjs版本的服务器,javascript,json,highcharts,export,phantomjs,Javascript,Json,Highcharts,Export,Phantomjs,我所做的: 下载最新的phantomjs(1.9.2,windows) 从github下载highcharts-convert.js的最新源代码(注意:下载整个目录) 在服务器模式下使用转换脚本启动phantomjs: bin\phantomjs.exe--debug=yes js\highcharts-convert.js-主机127.0.0.1-端口3003 使用CURL将示例json发送到phantomjs服务器: curl-H“Content-Type:applicatio
- 下载最新的phantomjs(1.9.2,windows)
- 从github下载highcharts-convert.js的最新源代码(注意:下载整个目录)
- 在服务器模式下使用转换脚本启动phantomjs:
bin\phantomjs.exe--debug=yes js\highcharts-convert.js-主机127.0.0.1-端口3003
- 使用CURL将示例json发送到phantomjs服务器:
curl-H“Content-Type:application/json”-X POST-d'{“infle”:“{xAxis:{categories:[\'Jan\',\'Feb\',\'Mar\']},series:[{data:[29.9,71.5,106.4]}}”}127.0.0.1:3003
我得到的是:
渲染失败:
SyntaxError:无法分析JSON字符串
注意:这在命令行上运行正常:
bin\phantomjs\highcharts-convert.js-infle options.json-outfile chart.svg
你好!我复制了你在W8上的步骤。复制和粘贴您的命令,它的工作开箱即用。。。它仍然不工作吗?我在Win7 Pro上遇到了同样的问题。我使用PhantomJS1.9.7。