data={"convID":"E40E92FD4B410","serverDate":"2012/06/15 07:51:07 PM","masterInfo":{"instance":"808477149_R_BDD72269D1C1E98A32D8C83EC58CF471","appVersion":"0.97.13.D","depth":4,"jsonURL":"//testtn","scenario":"R","serverDate":"2012/06/15 07:51:07 PM ","deviceName":"M’s","localDate":"2012/5/6 11:14:59 AM PDT"}}
JSON.parse(data);
给出一个错误。这是由 JSON.generate 在 ruby 脚本中生成并发送到节点 http 服务器,应用 decodeURIComponent 来获取上面打印的数据。仍然 JSON 解析失败并出现此错误:
undefined:1
ate":"2012/06/15
^
SyntaxError: Unexpected token d
at Object.parse (native)