使用第三方平台提交小程序代码接口,由于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\""}
你调用第三方的上传代码接口的时候应该把这个JSON转换成字符串
我也碰到了这个问题,最后怎么解决的?