-
Type:
Bug
-
Status: Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 0.10.0
-
Component/s: Node.js - Library
-
Labels:None
Consider the following code using the Thrift example types.
serialize.js
var thrift = require('thrift'); var test_types = require('gen-nodejs/ThriftTest_types.js'); var bonk = new test_types.Bonk({message: "message", type: 6}) var t_out = new thrift.TBufferedTransport(); var p_out = new thrift.TJSONProtocol(t_out); bonk.write(p_out); var out t_out.flush(function (b) { out = b;}); console.log(out)
My expectation would be for out to contain the serialized Bonk struct.
But due to TJSONProtocol only writing to the underlying transport in writeMessageEnd the above code does not work.