Jawbone pub sub json 负载结构改变
Jawbone pub sub json payload structure change
我将 jawbone 与我的应用程序集成在一起,一切正常。
我根据 jawbone 开发门户 (https://jawbone.com/up/developer/pubsub) 中提到的文档实现了 pub sub 通知的身份验证
我遵循了 jawbone 开发门户中给出的 pub sub json 有效载荷结构
但是现在我得到了不同的 pub sub json 有效载荷结构。所以我的 pub sub 不工作。
pub sub json payload 结构有变化吗?
开发平台上提到的payload结构是这样的:
{
"notification_timestamp": "1372787949",
"events": [
{
"user_xid": "RGaCBFg9CsB83FsEcMY44A",
"event_xid": "EJpCkyAtwoO0XTdkYyuTNw",
"type": "move",
"action": "creation" ,
"timestamp": "1372787849",
"secret_hash":"e570b3071a0964f9e2e69d13nd9ba19535392aaa"
},
{
"user_xid": "RGaCBFg9CsB83FsEcMY44A",
"event_xid": "blaHyAtwoO0XTdkYyuTNw",
"type": "sleep",
"action": "updation" ,
"timestamp": "1372787859",
"secret_hash":"e570b3071a0964f9e2e69d13nd9ba19535392aaa"
}]
}
我在服务器中获得的实际有效负载如下:
{
"secret_hash": "34ba79b1512cb1bxxxxxxx",
"events":[
{
"user_xid": "6HGK86qWtLJIoXXXX",
"event_xid": "akA6KuLaNsJv8XXXXX ",
"type": "move",
"action": "updation",
"timestamp": "1473145183"
}],
"notification_timestamp": "1473145183"
}
这是 documentation on the developer portal 中的一个错误。谢谢指出!
示例已更新,以反映每个通知只有一个 secret_hash
:
{
"notification_timestamp": "1372787949",
"events": [
{
"user_xid": "RGaCBFg9CsB83FsEcMY44A",
"event_xid": "EJpCkyAtwoO0XTdkYyuTNw",
"type": "move",
"action": "creation" ,
"timestamp": "1372787849"
},
{
"user_xid": "RGaCBFg9CsB83FsEcMY44A",
"event_xid": "blaHyAtwoO0XTdkYyuTNw",
"type": "sleep",
"action": "updation" ,
"timestamp": "1372787859"
}
],
"secret_hash": "e570b3071a0964f9e2e69d13nd9ba19535392aaa",
}
我将 jawbone 与我的应用程序集成在一起,一切正常。 我根据 jawbone 开发门户 (https://jawbone.com/up/developer/pubsub) 中提到的文档实现了 pub sub 通知的身份验证 我遵循了 jawbone 开发门户中给出的 pub sub json 有效载荷结构 但是现在我得到了不同的 pub sub json 有效载荷结构。所以我的 pub sub 不工作。 pub sub json payload 结构有变化吗?
开发平台上提到的payload结构是这样的:
{
"notification_timestamp": "1372787949",
"events": [
{
"user_xid": "RGaCBFg9CsB83FsEcMY44A",
"event_xid": "EJpCkyAtwoO0XTdkYyuTNw",
"type": "move",
"action": "creation" ,
"timestamp": "1372787849",
"secret_hash":"e570b3071a0964f9e2e69d13nd9ba19535392aaa"
},
{
"user_xid": "RGaCBFg9CsB83FsEcMY44A",
"event_xid": "blaHyAtwoO0XTdkYyuTNw",
"type": "sleep",
"action": "updation" ,
"timestamp": "1372787859",
"secret_hash":"e570b3071a0964f9e2e69d13nd9ba19535392aaa"
}]
}
我在服务器中获得的实际有效负载如下:
{
"secret_hash": "34ba79b1512cb1bxxxxxxx",
"events":[
{
"user_xid": "6HGK86qWtLJIoXXXX",
"event_xid": "akA6KuLaNsJv8XXXXX ",
"type": "move",
"action": "updation",
"timestamp": "1473145183"
}],
"notification_timestamp": "1473145183"
}
这是 documentation on the developer portal 中的一个错误。谢谢指出!
示例已更新,以反映每个通知只有一个 secret_hash
:
{
"notification_timestamp": "1372787949",
"events": [
{
"user_xid": "RGaCBFg9CsB83FsEcMY44A",
"event_xid": "EJpCkyAtwoO0XTdkYyuTNw",
"type": "move",
"action": "creation" ,
"timestamp": "1372787849"
},
{
"user_xid": "RGaCBFg9CsB83FsEcMY44A",
"event_xid": "blaHyAtwoO0XTdkYyuTNw",
"type": "sleep",
"action": "updation" ,
"timestamp": "1372787859"
}
],
"secret_hash": "e570b3071a0964f9e2e69d13nd9ba19535392aaa",
}