收藏
回答

第三方平台小程序提交代码返回错误 无法Json 解析 ?

使用第三方平台提交小程序代码接口,由于ext.json 配置问题导致接口返回错误,但是接收到的json字符串无法正确解析。

ext.json 如下:

{"pages":[{"path":"pages\/template\/tech\/electronic\/index\/index\/index","style":{"navigationBarTitleText":"首页"}},{"path":"pages\/template\/tech\/electronic\/news\/index\/index","style":{"navigationBarTitleText":"新闻"}},{"path":"pages\/template\/tech\/electronic\/news\/detail\/detail","style":{"navigationBarTitleText":"文章详情"}}],"globalStyle":{"navigationBarTextStyle":"black","navigationBarTitleText":"uni-app","navigationBarBackgroundColor":"#F8F8F8","backgroundColor":"#F8F8F8"},"easycom":{"autoscan":true,"custom":{"^uni-(.*)":"@\/components\/uni-$1\/uni-$1.vue","^vue-file-(.*)":"packageName\/path\/to\/vue-file-$1.vue"}},"tabBar":{"color":"#7A7E83","selectedColor":"#007AFF","borderStyle":"black","backgroundColor":"#F8F8F8","list":[{"pagePath":"pages\/template\/tech\/electronic\/index\/index\/index","iconPath":"static\/index_icon.png","selectedIconPath":"static\/index_icon_selected.png","text":"首页"},{"pagePath":"pages\/template\/tech\/electronic\/news\/index\/index","iconPath":"static\/new_icon.png","selectedIconPath":"static\/news_icon_selected.png","text":"新闻"}]},"extEnable":true,"extAppid":"APPID"}

接口返回报错如下:

{"errcode":85047,"errmsg":"error: invalid file : ext.json, has empty array member \ rid: 5fd1df1c-69fbd296-71ac03f2"pages\""}

最后一次编辑于  2020-12-11
回答关注问题邀请回答
收藏

2 个回答

  • 拾忆
    拾忆
    2020-12-10

    你调用第三方的上传代码接口的时候应该把这个JSON转换成字符串

    2020-12-10
    有用 1
    回复 1
    • YoHolA楠
      YoHolA楠
      2020-12-11
      我在调用接口时已经转换为string
      2020-12-11
      回复
  • 止水
    止水
    2021-02-05

    我也碰到了这个问题,最后怎么解决的?


    2021-02-05
    有用
    回复
登录 后发表内容
问题标签