duanfan8360 2016-10-06 10:38
浏览 49

更新存折错误 - 无法读取传递,因为它无效

I'm trying to send a new pass json data to my device to update my pass in Apple Wallet following the part "Getting the Latest Version of a Pass" in this document.
The new json data is exactly the same the json data that I used for creating the pass successfully, except the backgroundColor is changed from #3e7cc8 to #000000 (for testing) but I got the "Invalid json data" error all the time.
Here are the successful creating json data

{
   "description":"description",
   "formatVersion":1,
   "organizationName":"organizationName",
   "passTypeIdentifier":"passTypeIdentifier",
   "serialNumber":"serialNumber",
   "teamIdentifier":"teamIdentifier",
   "foregroundColor":"#ffffff",
   "backgroundColor":"#3e7cc8",
   "labelColor":"#ffffff",
   "barcode":{
      "message":"d568866a45dfc010ac680a9d06e5a48feb9216a2",
      "messageEncoding":"utf-8",
      "format":"PKBarcodeFormatQR"
   },
   "logoText":"logoText",
   "storeCard":{
      "headerFields":[

      ],
      "primaryFields":[

      ],
      "secondaryFields":[
         {
            "key":"name",
            "label":"",
            "value":"Nick"
         },
         {
            "key":"points",
            "label":"",
            "value":"0 Points"
         }
      ],
      "auxiliaryFields":[

      ],
      "backFields":[
         {
            "key":"email",
            "label":"Email",
            "value":"hoangtrung.uit@gmail.com"
         },
         {
            "key":"phone",
            "label":"Phone",
            "value":"+841689984964"
         }
      ],
      "locations":[

      ]
   },
   "authenticationToken":"authenticationToken",
   "webServiceURL":"https://mydomain/passbook"
}

and the invalid updating json data

{
   "description":"description",
   "formatVersion":1,
   "organizationName":"organizationName",
   "passTypeIdentifier":"passTypeIdentifier",
   "serialNumber":"serialNumber",
   "teamIdentifier":"teamIdentifier",
   "foregroundColor":"#ffffff",
   "backgroundColor":"#000000",
   "labelColor":"#ffffff",
   "barcode":{
      "message":"d568866a45dfc010ac680a9d06e5a48feb9216a2",
      "messageEncoding":"utf-8",
      "format":"PKBarcodeFormatQR"
   },
   "logoText":"logoText",
   "storeCard":{
      "headerFields":[

      ],
      "primaryFields":[

      ],
      "secondaryFields":[
         {
            "key":"name",
            "label":"",
            "value":"Nick"
         },
         {
            "key":"points",
            "label":"",
            "value":"0 Points"
         }
      ],
      "auxiliaryFields":[

      ],
      "backFields":[
         {
            "key":"email",
            "label":"Email",
            "value":"hoangtrung.uit@gmail.com"
         },
         {
            "key":"phone",
            "label":"Phone",
            "value":"+841689984964"
         }
      ],
      "locations":[

      ]
   },
   "authenticationToken":"authenticationToken",
   "webServiceURL":"https://mydomain/passbook"
}

What's wrong with my updating json data? Please help.

  • 写回答

2条回答 默认 最新

  • duandao6414 2016-10-06 10:59
    关注

    I am not entirely sure, but the documentation states:

    Background color of the pass, specified as an CSS-style RGB triple. For example, rgb(23, 187, 82)

    You can try to follow the format given by the documentation.

    评论

报告相同问题?

悬赏问题

  • ¥15 微信小程序协议怎么写
  • ¥15 c语言怎么用printf(“\b \b”)与getch()实现黑框里写入与删除?
  • ¥20 怎么用dlib库的算法识别小麦病虫害
  • ¥15 华为ensp模拟器中S5700交换机在配置过程中老是反复重启
  • ¥15 java写代码遇到问题,求帮助
  • ¥15 uniapp uview http 如何实现统一的请求异常信息提示?
  • ¥15 有了解d3和topogram.js库的吗?有偿请教
  • ¥100 任意维数的K均值聚类
  • ¥15 stamps做sbas-insar,时序沉降图怎么画
  • ¥15 买了个传感器,根据商家发的代码和步骤使用但是代码报错了不会改,有没有人可以看看