10893 questions

12980 answers


26376 members

0 votes
536 views 0 comments

We would like to use a TRB140 to HTTP POST JSON data to our server. The JSON format our server is expecting is as follows:

"body":{"[{Token: 015299fd8e7f,endpointID: 21,value: 1875}]"}

 We setup the TRB "JSON format" field in the "DATA TO SERVER" section as follows:

{Token: 015299fd8e7f,endpointID:21,value: %a}

However, the TRB POST actually results in the following format:

"body":{"[{Token: 015299fd8e7f,endpointID: 21,value: [1875,1]}]":""}}

The "Register data" object has two parts, the value and the register. We only care to see the value.  Are there any advanced formatting options we can explore to manipulate the JSON format so we can achieve the format requiered by our server?

1 Answer

0 votes

Could you give screenshots of your configuration on both client and server sides?