diwakergupta/thrift-missing-guide

Add binary type to Thrift-missing-guide

Closed this issue · 1 comments

Binary type is missing from the guide.

C++ -> std::string
Java -> byte[],
since r996579: java.nio.ByteBuffer


r665099 | mcslee | 2007-04-13 07:27:12 +0530 (Fri, 13 Apr 2007) | 8 lines
Add explicit binary type to Thrift
Summary: Identical to string in all languages except Java. Java String is NOT binary-safe, so we need to use raw byte[] in that case. PHP/RUBY/Python strings are all binary safe, and C++ std::string works fine and manages memory for you so it's the safest route. Java just needs this tweak.

Test Plan: Use "binary" as a type instead of String.

~bhaskie

Fixed, thanks!