[ 
https://issues.apache.org/jira/browse/THRIFT-1277?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13249774#comment-13249774
 ] 

Henrique Mendonca commented on THRIFT-1277:
-------------------------------------------

Hi Christoph and Roger
I think the loose option is a little more robust. Otherwise it would break if 
someone sets a property to "undefined".
a jslint friendly version would be something like:
{code}
    out << indent() << "if (this." << (*f_iter)->get_name() << " !== null && 
this." << (*f_iter)->get_name() << " !== undefined) {" << endl;
{code}
I can provide a patch if you prefer, and agree :)
                
> Node.js serializes false booleans as null
> -----------------------------------------
>
>                 Key: THRIFT-1277
>                 URL: https://issues.apache.org/jira/browse/THRIFT-1277
>             Project: Thrift
>          Issue Type: Bug
>          Components: JavaScript - Compiler, Node.js - Compiler
>    Affects Versions: 0.7
>            Reporter: Hans Duedal
>            Assignee: Hans Duedal
>              Labels: compiler, node, nodejs
>             Fix For: 0.9
>
>         Attachments: nodejs_compiler_false_bools.patch, 
> nodejs_compiler_false_bools_loose.patch
>
>
> When serializing boolean types, false booleans are serialized as null instead 
> of false.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to