struct demoMessage
{
        1: string myIdentifies;
        2: string myDatum;
        3: list<string> myList;
}

That would be the equivalent in a thrift file, if I get the terminology of 
Google right.
Although I think Thrift's approach is much easier to understand and more 
logical, especialy if you come from C++.

Patrick
 
Am Dienstag 26 Mai 2009 um 01:28AM schrieb "Joshua Kramer" 
<[email protected]>:
>Hello,
>
>How can I specify repeating elements in a thrift spec?
>
>For example if I'm using Google Protocol Buffers, I can do this:
>
>message demoMesssage {
>    required string myIdentifier = 1;
>    optional string myDatum = 2;
>    repeated string myList = 3;
>}
>
>In this case, I can have zero or more strings in myList.  In the root 
>object (Python, C++, etc) it is specified as an array.  How might I 
>represent that message in Thrift-speak?
>
>Cheers,
>-Josh
>
>

Reply via email to