Github user Jens-G commented on a diff in the pull request: https://github.com/apache/thrift/pull/658#discussion_r42543775 --- Diff: lib/dart/lib/src/protocol/t_json_protocol.dart --- @@ -321,12 +327,36 @@ class TJsonProtocol extends TProtocol { continue; } - // it's \u00XX - _readJsonSyntaxChar(_Constants.HEX_0_BYTES[0]); - _readJsonSyntaxChar(_Constants.HEX_0_BYTES[0]); - transport.readAll(_tempBuffer, 0, 2); - byte = _hexVal(_tempBuffer[0]) << 4 + _hexVal(_tempBuffer[1]); - bytes.add(byte); + // it's \uXXXX + transport.readAll(_tempBuffer, 0, 4); + byte = (_hexVal(_tempBuffer[0]) << 12) + + (_hexVal(_tempBuffer[1]) << 8) + + (_hexVal(_tempBuffer[2]) << 4) + + _hexVal(_tempBuffer[3]); + if (_isHighSurrogate(byte)) { + if (codeunits.isNotEmpty) { --- End diff -- Shouldn't that be `if( codeunits.isEmpty) { throws ... }`, similar to line 344?
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---