You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@thrift.apache.org by Avinash Dongre <do...@gmail.com> on 2013/04/18 10:54:08 UTC

Thrift Response to Perl Object

I have implemented my Thrift server in Java . Following is my IDL file

struct TColumn {
    1: string columnName,
    2: string columnValue
}

struct TRow {
    1: list<TColumn> columns
}

struct TResultSet {
    1: list<TRow> rows
}

I have api which returns TResultSet.
When I dump the output using Perl::Data::dumper , I get following

$VAR1 = bless( {
                 'rows' => [
                             bless( {
                                      'columns' => [
                                                     bless( {
                                                              'columnName'
=> 'TABLESCHEMANAME',
                                                              'columnValue'
=> 'FROM_PERL'
                                                            },
'abc::TColumn' )
                                                   ]
                                    }, 'abc::TRow' )
                           ]
               }, 'abc::TResultSet' );

But Now How Do I convert this to Perl Native TResultSet, so that I can
access indivicual rows and columns


Thanks
Avinash