You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "James E. King, III (JIRA)" <ji...@apache.org> on 2015/12/08 22:24:10 UTC
[jira] [Updated] (THRIFT-519) Support collections of types without
having to explicitly define it
[ https://issues.apache.org/jira/browse/THRIFT-519?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
James E. King, III updated THRIFT-519:
--------------------------------------
Priority: Minor (was: Major)
> Support collections of types without having to explicitly define it
> -------------------------------------------------------------------
>
> Key: THRIFT-519
> URL: https://issues.apache.org/jira/browse/THRIFT-519
> Project: Thrift
> Issue Type: New Feature
> Reporter: Nathan Marz
> Assignee: James E. King, III
> Priority: Minor
>
> 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);
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)