html52.com
我爱小程序-开发者交流社区

json 错误 求分析下问题出在那

问题模块
API和组件

Fri Mar 31 2017 01:38:43 GMT+0800 (中国标准时间) parse json 错误

VM247:2 pages/recharge/recharge.json

Expecting 'STRING','NUMBER','NULL','TRUE','FALSE','{','[', got EOF

  1 | (anonymous function) @ VM247:2

APP.json文件如下:
APP.json文件如下:

{

  "pages":[

    "pages/index/index",

    "pages/openlocation/openlocation",

    "pages/login/login",

    "pages/mine/mine",

    "pages/journey/journey",

    "pages/journeypath/journeypath",

    "pages/wallet/wallet",

    "pages/trade/trade",

    "pages/recharge/recharge",

    "pages/settings/settings"

  ]

  ,

  "window": {

    "navigationBarTextStyle": "black",

    "navigationBarTitleText": "wechat",

    "navigationBarBackgroundColor": "#fbf9fe",

    "backgroundColor": "#fbf9fe"

  },

  "tabBar": {

    "color": "#dddddd",

    "selectedColor": "#3cc51f",

    "borderStyle": "black",

    "backgroundColor": "#ffffff",

    "list": [{

      "pagePath": "pages/index/index",

      "iconPath": "image/bicycle1.png",

      "selectedIconPath": "image/bicycle2.png",

      "text": "使用"

    }, {

      "pagePath": "pages/mine/mine",

      "iconPath": "image/mine.png",

      "selectedIconPath": "image/mine.png",

      "text": "我的"

    }]

  },

  "networkTimeout": {

    "request": 10000,

    "connectSocket": 10000,

    "uploadFile": 10000,

    "downloadFile": 10000

  },

  "debug": true

}


wallet.json文件是空的

网友回复

默克L:

 是需要创建一个文件夹,然后把这些复制进JSON就行了吗?


Foreach:

就是因为你JSON文件是空的所以报错 JSON文件里面写{}就好了  必须有一个对象存在

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

真正的个人免签约支付接口

云免签H5支付