收藏
回答

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文件如下:

{

  "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文件是空的

最后一次编辑于  2017-03-31  (未经腾讯允许,不得转载)
回答关注问题邀请回答
收藏

2 个回答

  • 默克L
    默克L
    2018-02-05

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


    2018-02-05
    赞同
    回复
  • Foreach
    Foreach
    2017-03-31

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

    2017-03-31
    赞同
    回复