使用php语言进行微信开发时,在创建卡券的时候出现数据格式错误,错误返回信息如下:
{“errcode”:47002,”errmsg”:”data format error, do not use json unicode encode (\uxxxx\uxxxx), please use utf8 encoded text! hint: [udjhfa0680e569]”}
解决办法:
使用php中的json_encode函数时加上参数json_unescaped_unicode即可,如:
json_encode($arr,json_unescaped_unicode)
以上就是微信开发中json格式不正确怎么办的详细内容。
