网关REST模式文件中似乎忽略了"操作"数组

2020-09-20 19:38发布

点击此处---> 群内免费提供SAP练习系统(在群公告中)加入QQ群:457200227(SAP S4 HANA技术交流) 群内免费提供SAP练习系统(在群公告中)大家好, 最近要解决此问...

         点击此处--->   EasySAP.com群内免费提供SAP练习系统(在群公告中)

加入QQ群:457200227(SAP S4 HANA技术交流) 群内免费提供SAP练习系统(在群公告中)


大家好,

最近要解决此问题,在其中映射这样的属性:

" device_data":{" type":" object"," mapTo":" value"," actions":[{" type":" ADD"," mapTo":" capability_alternate_id"," value": " HR003"},{" type":" ADD"," mapTo":" sensor_type_alternate_id"," value":123123123},{" type":" ADD"," mapTo":" sensor_alternate_id"," value": " hrsens01"}]," properties":{" *":{" mapKeyTo":" property_name"," mapTo":" value"}}}

制作"动作"数组似乎被忽略了,这种单测量功能不会发生这种情况:

" user_uuid":{" type":" integer"," mapTo":" value"," actions":[{" type":" ADD"," mapTo":" capability_alternate_id"," value": " HR001"},{" type":" ADD"," mapTo":" sensor_type_alternate_id"," value":123123123},{" type":" ADD"," mapTo":" sensor_alternate_id"," value": " hrsens01"}]}

请问我做错什么了吗?

谢谢

Federico

3条回答
闻人可可
2020-09-20 19:46

嗨Federico,

要在不指定 capabilityAlternateId , sensorAlternateId 和 sensorTypeAlternateId 的情况下发送Bean,则必须使用如下模式: >
 {
 " type":"对象",
 " parserData":{
 " format":" JSON",
 "资源":" MQTT_message",
 " messageType":"默认",
 " messageTypeFinder":{
 " format":" JSON_POINTER",
 " jsonPointer":"/img/messageType"
 }
 },
 "动作":[{
 " type":" ADD",
 " mapTo":" sensor_type_alternate_id",
 "值":123123123
 },{
 " type":" ADD",
 " mapTo":" capability_alternate_id",
 "值":" HR003"
 },{
 " type":" ADD",
 " mapTo":" sensor_alternate_id",
 " value":" hrsens01"
 }
 ],
 "属性":{
 " device_data":{
 " type":"对象",
 " mapTo":"值"
 }
 }
 }

 

并以数组格式的数组发送有效载荷,例如:

 {
 " device_data":[[20,"序列",96," fw_version"," hw_version","罗马"]]
 } 

一周热门 更多>