Can I make Orion Context Broker ignore additional fields in JSON payload in POST request -
we want transfer data spark core context broker using regular post request (v1/updatecontext). generate following json payload:
{ "contextelements“: [ { "type":"producer“, "ispattern":"false“, "id":"1337“, "attributes“: [ { "name":"currentpower“, "type":"float“, "value":“0" }, { "name":"timestamp“, "type":"int“, "value":"2015-07-07t20:32:36.958z“ } ] } ], "updateaction":“update"
}
however, firmware automatically adds additional fields (in addition "contextelements" , "updateaction") json payload. context broker responds error there unknown fields. can make context broker ignore additional fields , pick out 2 required?
no, cannot. expected way of working, in same way cannot use more arguments allowed ones when calling function in conventional programming languages.
as workaround, can use intermediate proxy filter out json pieces firmware devices generating , doesn't conform ngsi api orion implements.
Comments
Post a Comment