json 错误 求分析下问题出在那
发布于 6 年前 作者 xiulandai 8786 次浏览 来自 问答

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

2 回复

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

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

回到顶部