![](/img/trans.png)
[英]Google Apps Script JSON.Parse causing 'could not connect to server' on debug
[英]JSON.parse() not working in Google Apps Script?
JS 本地方法JSON.parse()
似乎在 Google Apps 脚本中出现故障。
const run = () => { const result = JSON.parse('{"foo": "bar"}'); Logger.log( 'result: %s', result, ); return result; }
抛出:
类型错误:JSON.parse 不是运行时的函数
这是 Google Apps 脚本的错误吗? 还是我做错了什么?
编辑:当我尝试JSON.stringify({foo: "bar"})
时,我也遇到了类似的错误
评论总结:
确保您没有将JSON
重新分配给其他东西。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.