Quantcast
Channel: Apache Timeline
Viewing all articles
Browse latest Browse all 5648

Why do JsonGenerator encodeBinary as unicode string?

$
0
0
Hi

I am wondering why avro-cpp JsonGenerator encodeBinary encode every byte as unicode?

132 class AVRO_DECL JsonGenerator {

157

158 void escapeCtl(char c) {

159 out_.write('\\');

160 out_.write('U');

161 out_.write('0');

162 out_.write('0');

163 out_.write(toHex((static_cast<unsigned char>(c)) / 16));

164 out_.write(toHex((static_cast<unsigned char>(c)) % 16));

165 }

Viewing all articles
Browse latest Browse all 5648

Trending Articles