diff --git a/mio/lib/json.c b/mio/lib/json.c index 6ff2695..eb74fce 100644 --- a/mio/lib/json.c +++ b/mio/lib/json.c @@ -1147,3 +1147,9 @@ jsonwr->pretty = 1; return 0; } + +int mio_jsonwr_writerawbytes (mio_jsonwr_t* jsonwr, const mio_uint8_t* dptr, mio_oow_t dlen) +{ + WRITE_BYTES_NOESC (jsonwr, dptr, dlen); + return 0; +} diff --git a/mio/lib/mio-json.h b/mio/lib/mio-json.h index e1a9c88..f4d0af5 100644 --- a/mio/lib/mio-json.h +++ b/mio/lib/mio-json.h @@ -309,6 +309,13 @@ MIO_EXPORT int mio_jsonwr_write ( #define mio_jsonwr_writestringwithbcstr(jsonwr,dptr) mio_jsonwr_write(jsonwr, MIO_JSON_INST_STRING, 0, dptr, mio_count_bcstr(dptr)) + +MIO_EXPORT int mio_jsonwr_writerawbytes ( + mio_jsonwr_t* jsonwr, + const mio_uint8_t* dptr, + mio_oow_t dlen +); + #if defined(__cplusplus) } #endif