thrift-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From denghuancong <denghuanc...@gmail.com>
Subject How to use list type in thrift of nodejs version ?
Date Thu, 25 Sep 2014 14:21:38 GMT

在 2014年9月24日,下午5:36,denghuancong <denghuancong@gmail.com> 写道:

> 
> 
>> hi all
>> ————
>> 	I am using thrift to connection between  my litter server and client app . The thrift
file is following:
>> 
>> struct ResponseCode {
>> 	1 : required i32 	    retcode
>> 	2 : required string 	message
>> }
>> 
>> struct UserInfo {
>>     1 : required i32 account_id
>>     2 : required string name
>>     3 : required string email
>>     4 : required string age
>>     5 : required SEXY sexy
>> }
>> 
>> struct GetUserInfoResponse{
>>      1 : required list<UserInfo> user_info_list
>>      2 : required ResponseCode rc
>> }
>> 
>> service AccountService {
>> 
>>   /*
>>   * get user info
>>   */
>>    GetUserInfoResponse GetUserInfoRequest(
>>         1 : list<i32> account_id_list
>>    )
>> }
>> 
>> 	The sever app send out the following content:
>> 
>> { user_info_list:
>>    [ { account_id: 4,
>>        name: 'xxx',
>>        email: '123@outlook.com',
>>        age: '19-28',
>>        sexy: 1 },
>>      { account_id: 7,
>>        name: ‘123',
>>        email: 'test@outlook.com',
>>        age: '19-28',
>>        sexy: 1 } ],
>>   rc: { retcode: 0, message: null } }
>> 
>> 	but the client app receive the following content:
>> 
>> { user_info_list: null, rc: { retcode: 0, message: null } }
>> 
>>   
>> 	Is that any wrong or bug in nodejs version?
> 


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message