You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@avro.apache.org by Patrick Nip <pn...@yahoo-inc.com> on 2014/09/27 05:00:15 UTC

Why do JsonGenerator encodeBinary as unicode string?

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     }