Hi Ravee,

Please take a look at the garage examples in resource/examples
The server creates an “complex” payload, and the client parses it..
Basically one should look at it from an json object perspective, e.g. each JSON 
object is an  OCRepresentation.
An array in JSON can be done by the template vector construct.

Hope this helps,
Wouter

From: iotivity-dev-boun...@lists.iotivity.org 
[mailto:iotivity-dev-boun...@lists.iotivity.org] On Behalf Of Raveendranath 
Kondrakunta
Sent: 01 February 2018 09:52
To: iotivity-dev@lists.iotivity.org
Subject: [dev] Exchange complicated Representations

Hi,

All the examples, show how to exchange simple representation with rep.setValue 
and rep.getValue.

roomserver.cpp and roomserver.h exchange child representations rep.addChild.

Assuming an complex use case, like Playlist in a media Player(for example 
std::vector<PlayItem>), where each item in the Playlist itself have lot of meta 
data. How can these be exchanged?

Does each play item need to be added with rep.addChild?

On the receiving end, client, will the data be received in the sequential order 
or in random order?

-Ravee
_______________________________________________
iotivity-dev mailing list
iotivity-dev@lists.iotivity.org
https://lists.iotivity.org/mailman/listinfo/iotivity-dev

Reply via email to