From 9e0161c58f247116e70531bda58427e27dfee0b5 Mon Sep 17 00:00:00 2001 From: hyung-hwan Date: Mon, 8 Jun 2020 09:25:09 +0000 Subject: [PATCH] added '\a' and '\v' to json escaping --- mio/lib/json.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/mio/lib/json.c b/mio/lib/json.c index efc81bd..383ce62 100644 --- a/mio/lib/json.c +++ b/mio/lib/json.c @@ -891,6 +891,10 @@ static int escape_char (mio_uch_t uch, mio_uch_t* xch) *xch = uch; break; + case '\a': + *xch = 'a'; + break; + case '\b': *xch = 'b'; break; @@ -911,6 +915,10 @@ static int escape_char (mio_uch_t uch, mio_uch_t* xch) *xch = 't'; break; + case '\v': + *xch = 'v'; + break; + default: x = (uch >= 0 && uch <= 0x1f)? 2: 0; break;