TProtocol protocol = new TBinaryProtocol(new TMemoryBuffer(buffer)); sbyte value = protocol.ReadByte();
TProtocol protocol = new TCompactingProtocol(new TMemoryBuffer(buffer)); sbyte value = protocol.ReadByte();
TProtocol protocol = new TJsonProtocol(new TMemoryBuffer(buffer)); sbyte value = protocol.ReadByte();In this example, we use TJsonProtocol instead of TBinaryProtocol or TCompactingProtocol to read from the buffer. The ReadByte method is called and returns a signed 8-bit integer value from the buffer. In all three examples, we use TProtocol and its ReadByte method to deserialize data from the protocol buffer.