关于#json#的问题,请各位专家解答!

宝友们康康哪里错了

img

{
  "pages": [
      "pages/index/index",
      "pages/address/address",
      "pages/person/person",
      "pages/order/order",
      "pages/detail/detail",
      "pages/modify/modify"
    
  ],
  "tabBar": {
      "color": "#333",
      "selectedColor": "#f7982a",
      "backgroundColor": "#f6f6f6",
      "borderStyle": "white",
      "list": [
          {
              "pagePath": "pages/index/index",
              "text": "首页",
              "iconPath": "images/home.png",
              "selectedIconPath": "images/home_select.png"
          },
          {
              "pagePath": "pages/person/person",
              "text": "个人中心",
              "iconPath": "images/me.png",
              "selectedIconPath": "images/me_select.png"
          }
      ]
  },
  "window": {
      "backgroundTextStyle": "light",
      "navigationBarBackgroundColor": "#f7982a",
      "navigationBarTextStyle": "white"
  },
"requiredPrivateInfos": [
            "chooseAddress"
      ]
}


是不是要转换一下,使用eval()函数进行转换 使用eval() 转换时需要在 json 字符外包裹一对小括号。

{
    "pages": [
        "pages/index/index",
        "pages/address/address",
        "pages/person/person",
        "pages/order/order",
        "pages/detail/detail",
        "pages/modify/modify"

    ],
    "tabBar": {
        "color": "#333",
        "selectedColor": "#f7982a",
        "backgroundColor": "#f6f6f6",
        "borderStyle": "white",
        "list": [{
                "pagePath": "pages/index/index",
                "text": "首页",
                "iconPath": "images/home.png",
                "selectedIconPath": "images/home_select.png"
            },
            {
                "pagePath": "pages/person/person",
                "text": "个人中心",
                "iconPath": "images/me.png",
                "selectedIconPath": "images/me_select.png"
            }
        ]
    },
    "window": {
        "backgroundTextStyle": "light",
        "navigationBarBackgroundColor": "#f7982a",
        "navigationBarTextStyle": "white"
    },
    "requiredPrivateInfos": [
        "chooseAddress"
    ]
}