收藏
回答

第三方代码包提交审核category is in invalid format

首先通过  https://api.weixin.qq.com/wxa/get_category?access_token=TOKEN 获取的数据为


{

  • errcode0,

  • errmsg"ok",

  • category_list: [

  • {

      first_class"工具",

      second_class"记账",

      third_class""

      }

      ]

}


通过   https://api.weixin.qq.com/wxa/submit_audit?access_token=TOKEN   将第三方代码包提交审核时 数据为


{

"item_list": [

{

"address":"pages/index/index",

"tag":"工具",

"first_class": "工具",

"second_class": "记账",

                        "third_class" : "",

"title": "首页"

}

]

}



显示结果为{"errcode":85008, "errmsg" : "category is in invalid format hint: [AbG2Ja0284e626]"}






回答关注问题邀请回答
收藏

9 个回答

  • 小七对
    小七对
    2017-06-13

    json_encode($data,JSON_UNESCAPED_UNICODE)中的$data是

    Array
    (
        [item_list] => Array
            (
                [0] => Array
                    (
                        [address] => pages/playsong/playsong
                        [tag] => 啊啊啊
                        [first_class] => 生活服务
                        [second_class] => 票务
                        [third_class] => 电影票
                        [title] => 心得写成
                    )
    
            )

    ),

    json_encode后是

    {"item_list":"[{\"address\":\"pages\\\/playsong\\\/playsong\",\"tag\":\"啊啊啊\",\"first_class\":\"生活服务\",\"second_class\":\"票务\",\"third_class\":\"电影票\",\"title\":\"心得写成\"}]"}

    ,但是接口返回

    [errno] => 47001
        [message] => 解析JSON/XML内容错误
    )@刘俊宇 



    2017-06-13
    有用
    回复
  • 夏乐叶
    夏乐叶
    2017-05-23

    可以了,感谢!

    2017-05-23
    有用
    回复 1
    • 2019-05-05

      你是怎么解决的啊

      2019-05-05
      回复
  • 2017-05-23

    json_encode($data,JSON_UNESCAPED_UNICODE)



    2017-05-23
    有用
    回复 1
    • 落雪听梅
      落雪听梅
      2018-07-27

      Java  这个怎么解决??

      2018-07-27
      回复
  • 夏乐叶
    夏乐叶
    2017-05-23

    请问php怎么解决? @刘俊宇 

    2017-05-23
    有用
    回复
  • 2017-05-11

    问题的确出现在中文字符上,不处理它就可以了。多谢!

    2017-05-11
    有用
    回复
  • 2017-05-11

    多谢

    我用的是php,我也试试特殊字符的问题

    2017-05-11
    有用
    回复
  • 范怀宇
    范怀宇
    2017-05-11

    楼主也是 python 吧,是编码问题,按照微信对中文的一贯处理习惯,是没法很好处理 /u 这样的编码的。


    需要:

    json.dumps(payload, ensure_ascii=False).encode("utf-8")


    2017-05-11
    有用
    回复
  • 范怀宇
    范怀宇
    2017-05-10

    same issue

    2017-05-10
    有用
    回复
  • 2017-05-08

    换了一个授权小程序测试


    通过  https://api.weixin.qq.com/wxa/get_category?access_token=TOKEN 获取的数据为

    {

    • errcode0,

    • errmsg"ok",

    • category_list: [

    •             {        

          first_class"工具",

          second_class"信息查询"

           },

          {

            first_class"教育",

            second_class"教育信息服务"

          }

          ]

    }




    通过   https://api.weixin.qq.com/wxa/submit_audit?access_token=TOKEN   将第三方代码包提交审核时 数据为


    {

    "item_list": [

    {

    "address":"pages/index/index",

    "tag":"工具",

    "first_class": "工具",

    "second_class": "信息查询",

    "title": "首页"

    }

    ]

    }



    显示结果 同为{"errcode":85008, "errmsg" : "category is in invalid format hint"}



    2017-05-08
    有用
    回复
登录 后发表内容