pack: when processing bin data to json, do str conversion
@@ -435,7 +435,7 @@ static int msgpack2json(char *buf, int *off, size_t left, msgpack_object *o)
case MSGPACK_OBJECT_BIN:
if (try_to_write(buf, off, left, "\"", 1) &&
(o->via.bin.size > 0 ?
- try_to_write(buf, off, left, (char*)o->via.bin.ptr, o->via.bin.size)
+ try_to_write_str(buf, off, left, (char*)o->via.bin.ptr, o->via.bin.size)
: 1 /* nothing to do */) &&
try_to_write(buf, off, left, "\"", 1)) {
ret = FLB_TRUE;
