added '\a' and '\v' to json escaping

This commit is contained in:
hyung-hwan 2020-06-08 09:25:09 +00:00
parent 52ddb45e75
commit 9e0161c58f

View File

@ -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;