Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
0.9.2
-
None
Description
Hello,
The current implementation of TJSONProtocol in node uses JSON.parse(this.trans.readAll()) to deserialize, it is working with TFramedTransport because readAll, returns a sole message, but when using TBufferedTransport several messages can be contained in the buffer. This cause a parse error from JSON.parse because it starts to read the next message as if it belongs to the first
I think the solution is to either to:
- detect the end of the JSON and parse only the message chunck
- implement/use a JSON parse wich can use data stream (like its done in the other languages)
Best regards,
Pierre
Attachments
Attachments
Issue Links
- Is contained by
-
THRIFT-2205 Node.js Test Server to support test.js JavaScript Browser test and sundry fixes
- Closed
- relates to
-
THRIFT-2205 Node.js Test Server to support test.js JavaScript Browser test and sundry fixes
- Closed