Closed thekvn closed 8 years ago
Hi Kevin,
a) null " "
1b
that's why it turns into null in JavaScript. According to http://code.kx.com/wiki/Reference/Datatypes char 32 is null. The thing I could imagine i introducing a config parameter to turn this off. Is that fine?
Ah I see.
Yes a config option to change this behaviour passed into node-q#connect would be great.
included in release v1.0.1.
nodeq.connect({
host: 'localhost',
port: 5080,
emptyChar2null: false
}, function(err, q) {
q.k(cmd, function(err, out) {
console.log("in:", cmd, "out:", out);
process.exit(0);
});
});
We are having issues with string based responses from q, spaces are being translated into nulls
Test app
output
We expected
" "
to translate into" "
in javascript.Code that deserializes ' ' into null https://github.com/michaelwittig/node-q/blob/master/lib/c.js#L53-L60
Tested for here: https://github.com/michaelwittig/node-q/blob/master/itest/deserialization.js#L296-L303
Is this behaviour intended?
Thanks