FOR TIPS, gUIDES & TUTORIALS

subscribe to our Youtube

GO TO YOUTUBE

14455 questions

17168 answers

28195 comments

0 members

We are migrating to our new platform at https://community.teltonika.lt. Moving forward, you can continue discussions on this new platform. This current platform will be temporarily maintained for reference purposes.
0 votes
906 views 0 comments
by

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
by anonymous
Hi,

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

EB.