Reading Object type Resource from Device Service #25
Replies: 3 comments 2 replies
-
do you mean write Object instead of read? You can read Object from virtual device service via the GetCommand. |
Beta Was this translation helpful? Give feedback.
-
Hey guys figured it out. For sending objects as response to read handler it should be of the form map[string]interface{}. Let me know that's a good way of doing it or is there a better way. |
Beta Was this translation helpful? Give feedback.
-
The following is the code that does the conversion. |
Beta Was this translation helpful? Give feedback.
-
I wanted to understand how I can read a Resource of Type "Object" from the device service. When I send the structure the "objectValue" field is just blank.
Do I need to convert the structure into a JSON object before sending? The Virtual device example does not have an example for it. It will be great If there is an example or explanation on how to do it.
Thanks.
Beta Was this translation helpful? Give feedback.
All reactions