[ https://issues.apache.org/jira/browse/THRIFT-3968?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15677617#comment-15677617 ]
Simon South commented on THRIFT-3968: ------------------------------------- [~matejkupljen], looking at [the C++ implementation|https://git-wip-us.apache.org/repos/asf?p=thrift.git;a=blob;f=lib/cpp/test/AllProtocolTests.tcc;h=8c8eaa8bf98d2259d164b4e2d1c32db7cd863b11;hb=16a23a6618754a5a87aeb8df99a72516b0272fb3#l205] it seems clear an empty string should be serialized and deserialized as-is; that is, the C (GLib) implementation should not be returning NULL in place of an empty string deserialized from a transport (as I've confirmed it does). I'm working on test cases and a fix for this now. > Deserializing empty string > -------------------------- > > Key: THRIFT-3968 > URL: https://issues.apache.org/jira/browse/THRIFT-3968 > Project: Thrift > Issue Type: Bug > Components: C glib - Compiler, C glib - Library > Affects Versions: 0.9.3, 1.0 > Reporter: Matej Kupljen > Assignee: Simon South > > If we use a string inside struct definition and set the value to "" (empty > string, not NULL) when de-serializing it we get set it NULL and and the same > time the __isset field for this value is set to TRUE which is think is not > correct. > Either we fix the library to return an empty string, or fix the compiler to > set the __isset filed to FALSE. > What would be the best way to solve this? > Please, let me know if you need any more information. -- This message was sent by Atlassian JIRA (v6.3.4#6332)