You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Roger Meier (Reopened) (JIRA)" <ji...@apache.org> on 2011/11/05 19:02:51 UTC
[jira] [Reopened] (THRIFT-1277) Node.js serializes false booleans
as null
[ https://issues.apache.org/jira/browse/THRIFT-1277?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Roger Meier reopened THRIFT-1277:
---------------------------------
This breaks JavaScript jslint, see https://builds.apache.org/job/Thrift/317/console and unittest:
{noformat}
unittest:
[echo] Running Unit Tests with headless browser!
[exec] Test testInsanity died, exception and test follows
[exec] TypeError: Result of expression 'this.argument.write' [undefined] is not a function.
[exec] function () {
[exec] var insanity = {
[exec] "1":{
[exec] "2":{
[exec] "userMap":{ "5":5, "8":8 },
[exec] "xtructs":[{
[exec] "string_thing":"Goodbye4",
[exec] "byte_thing":4,
[exec] "i32_thing":4,
[exec] "i64_thing":4
[exec] },
[exec] {
[exec] "string_thing":"Hello2",
[exec] "byte_thing":2,
[exec] "i32_thing":2,
[exec] "i64_thing":2
[exec] }
[exec] ]
[exec] },
[exec] "3":{
[exec] "userMap":{ "5":5, "8":8 },
[exec] "xtructs":[{
[exec] "string_thing":"Goodbye4",
[exec] "byte_thing":4,
[exec] "i32_thing":4,
[exec] "i64_thing":4
[exec] },
[exec] {
[exec] "string_thing":"Hello2",
[exec] "byte_thing":2,
[exec] "i32_thing":2,
[exec] "i64_thing":2
[exec] }
[exec] ]
[exec] }
[exec] },
[exec] "2":{ "6":{ "userMap":null, "xtructs":null } }
[exec] };
[exec] var res = client.testInsanity("");
[exec] ok(res, JSON.stringify(res));
[exec] ok(insanity, JSON.stringify(insanity));
[exec]
[exec] checkRecursively(res, insanity);
[exec] }
[exec] 'waitFor()' finished in 1644ms.
[exec] Tests completed in 1654 milliseconds.
[exec] 66 tests of 67 passed, 1 failed.
[java] Timeout: killed the sub-process
[java] Java Result: -1
{noformat}
> 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.8
>
> 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