thrift-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Patrick Schlangen <p.schlan...@mac.com>
Subject AW: Repeating Elements?
Date Tue, 26 May 2009 08:42:38 GMT
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" <josh@globalherald.net>:
>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
>
>

Mime
View raw message