aboutsummaryrefslogtreecommitdiff
path: root/qobject/qjson.c
diff options
context:
space:
mode:
Diffstat (limited to 'qobject/qjson.c')
-rw-r--r--qobject/qjson.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/qobject/qjson.c b/qobject/qjson.c
index f2857c13ea..846733dafb 100644
--- a/qobject/qjson.c
+++ b/qobject/qjson.c
@@ -127,6 +127,9 @@ static void to_json_list_iter(QObject *obj, void *opaque)
static void to_json(const QObject *obj, QString *str, int pretty, int indent)
{
switch (qobject_type(obj)) {
+ case QTYPE_QNULL:
+ qstring_append(str, "null");
+ break;
case QTYPE_QINT: {
QInt *val = qobject_to_qint(obj);
char buffer[1024];