[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 3/6] qjson: Handle "\f"
From: |
Luiz Capitulino |
Subject: |
[Qemu-devel] [PATCH 3/6] qjson: Handle "\f" |
Date: |
Wed, 19 May 2010 18:15:30 -0300 |
It's valid JSON and should be handled.
Signed-off-by: Luiz Capitulino <address@hidden>
---
json-parser.c | 4 ++++
qjson.c | 3 +++
2 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/json-parser.c b/json-parser.c
index b55d763..83212bc 100644
--- a/json-parser.c
+++ b/json-parser.c
@@ -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++;
diff --git a/qjson.c b/qjson.c
index 483c667..e4ee433 100644
--- a/qjson.c
+++ b/qjson.c
@@ -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;
--
1.7.1.86.g0e460
- [Qemu-devel] Re: [PATCH 2/6] json-lexer: Handle missing escapes, (continued)
- [Qemu-devel] Re: [PATCH 2/6] json-lexer: Handle missing escapes, Anthony Liguori, 2010/05/20
- [Qemu-devel] Re: [PATCH 2/6] json-lexer: Handle missing escapes, Luiz Capitulino, 2010/05/20
- [Qemu-devel] Re: [PATCH 2/6] json-lexer: Handle missing escapes, Anthony Liguori, 2010/05/20
- [Qemu-devel] Re: [PATCH 2/6] json-lexer: Handle missing escapes, Luiz Capitulino, 2010/05/20
- [Qemu-devel] Re: [PATCH 2/6] json-lexer: Handle missing escapes, Anthony Liguori, 2010/05/20
- [Qemu-devel] Re: [PATCH 2/6] json-lexer: Handle missing escapes, Luiz Capitulino, 2010/05/20
- Re: [Qemu-devel] Re: [PATCH 2/6] json-lexer: Handle missing escapes, Anthony Liguori, 2010/05/24
- Re: [Qemu-devel] Re: [PATCH 2/6] json-lexer: Handle missing escapes, Luiz Capitulino, 2010/05/24
[Qemu-devel] [PATCH 3/6] qjson: Handle "\f",
Luiz Capitulino <=
[Qemu-devel] [PATCH 4/6] check-qjson: Add more escape tests, Luiz Capitulino, 2010/05/19
[Qemu-devel] [PATCH 6/6] json-streamer: Don't use qdict_put_obj(), Luiz Capitulino, 2010/05/19
[Qemu-devel] [PATCH 5/6] json-lexer: Drop 'buf', Luiz Capitulino, 2010/05/19
Re: [Qemu-devel] [PATCH 0/6]: QMP: Fix issues in parser/lexer, Anthony Liguori, 2010/05/19