Details
-
New Feature
-
Status: Closed
-
Minor
-
Resolution: Won't Fix
-
None
-
None
-
None
Description
I frequently find myself needing to be able to serialize/deserialize collections of objects across languages. Every time I need one of these collections, I have to explicitly define it in a thrift file. Some examples are:
struct FriendSet {
1: set<binary> friend_ids;
}
struct StringList {
1: list<string> strings;
}
struct FooList {
1: list<Foo> foos; // foo is a thrift struct
}
It would be convenient if Thrift supported collections of objects directly. Perhaps serialize/deserialize can support taking a list or set, such as:
TDeserializer des = new TDeserializer();
List<Foo> myList = new ArrayList<Foo>();
des.deserialize(myList, record);