1

我在 404.liquid 中修改 HTML 时遇到问题。

这是我要发送的 JSON: http: //cl.ly/image/3r0l3w2q2E0S

这是我的回应:

array(1) { ["error"]=> string(157) "lexical error: invalid string in json text. ODE: START -->n

我认为它失败了,因为 HTML 破坏了 JSON。Shopify 是否需要某种编码来防止 JSON 出现此类错误?

请指教。提前致谢!

4

1 回答 1

1

这个问题已被解决。这是由于 PHP 适配器中的 stripslashes() 函数造成的。以下是修复细节:

https://github.com/nyalex/shopify_api/commit/029d5025b2d5acfa376d2160cbd9845189d9a06d

于 2012-10-30T16:14:34.083 回答