提交 bd032695 编写于 作者: L Luiz Capitulino

qjson: Handle "\f"

It's valid JSON and should be handled.
Signed-off-by: NLuiz Capitulino <lcapitulino@redhat.com>
上级 1041ba7a
......@@ -206,6 +206,10 @@ static QString *qstring_from_escaped_str(JSONParserContext *ctxt, QObject *token
qstring_append(str, "\b");
ptr++;
break;
case 'f':
qstring_append(str, "\f");
ptr++;
break;
case 'n':
qstring_append(str, "\n");
ptr++;
......
......@@ -158,6 +158,9 @@ static void to_json(const QObject *obj, QString *str)
case '\b':
qstring_append(str, "\\b");
break;
case '\f':
qstring_append(str, "\\f");
break;
case '\n':
qstring_append(str, "\\n");
break;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册