thrift-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jared Szechy (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (THRIFT-3669) JS Deserialization of lists of lists is broken
Date Wed, 23 Aug 2017 00:26:00 GMT

     [ https://issues.apache.org/jira/browse/THRIFT-3669?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Jared Szechy updated THRIFT-3669:
---------------------------------
    Attachment: THRIFT-3669-0.10.0.pach

If it helps I cleaned up the previous patch (removed syntax formatting) and updated it for
v0.10.0.


> JS Deserialization of lists of lists is broken
> ----------------------------------------------
>
>                 Key: THRIFT-3669
>                 URL: https://issues.apache.org/jira/browse/THRIFT-3669
>             Project: Thrift
>          Issue Type: Bug
>          Components: JavaScript - Library
>    Affects Versions: 0.9.3
>            Reporter: Christian B├╝rckert
>         Attachments: 0001-Fixed-THRIFT-3669.patch, THRIFT-3669-0.10.0.pach, thrift.js
>
>
> struct QueryResult {
> 	1: required list<list<string>> rows;
> }
> service QueryService{
> 	QueryResult query(); 
> }
> Using TJSONProtocol the list<list<string>> is transmitted correctly but deserialized
wrong. Only the first sublist will contain the correct string values the second, third and
so on will be empty. The error is a combination of readListBegin, readListEnd and readString
(in thrift.js) which somehow interacts wrongly with the internal rstack when lists are included
in lists. 
> As a temporary solution until the deserialization is fixed I advice others to create
an intermediate struct which contains the sublists.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message