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; *xch = uch;
break; break;
case '\a':
*xch = 'a';
break;
case '\b': case '\b':
*xch = 'b'; *xch = 'b';
break; break;
@ -911,6 +915,10 @@ static int escape_char (mio_uch_t uch, mio_uch_t* xch)
*xch = 't'; *xch = 't';
break; break;
case '\v':
*xch = 'v';
break;
default: default:
x = (uch >= 0 && uch <= 0x1f)? 2: 0; x = (uch >= 0 && uch <= 0x1f)? 2: 0;
break; break;