Apache thrift, struct contain itself

Posted by mamu on Stack Overflow See other posts from Stack Overflow or by mamu
Published on 2010-06-10T04:47:19Z Indexed on 2010/06/10 4:52 UTC
Read the original article Hit count: 238

I am looking into thrift for serialization of data. But Document says

cyclic structs - Structs can only contain structs that have been declared before it. A struct also cannot contain itself

One of our requirement is

  • Struct A
    • List of Child items
      • Items(Items are Struct A )

So reading requirement i can't have Struct within itself at any level? can i have it in cyclic model as i have it above. Struct is not member of Struct directly but it has some other member and it contains struct.

Their document is not so well descriptive.

Is it possible in Thrift? Does protobuf supports it?

© Stack Overflow or respective owner

Related posts about protocol-buffers

Related posts about thrift