use TJSONProtocol as input, TBinaryProtocol as output