From 02bf5b48c041ef6fb575953b911e4268a44a9a9f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jos=C3=A9=20Fonseca?= Date: Tue, 11 Oct 2011 19:33:02 +0100 Subject: [PATCH] Handle null strings in json writer. --- common/json.hpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/common/json.hpp b/common/json.hpp index 9e6b960..621610a 100644 --- a/common/json.hpp +++ b/common/json.hpp @@ -270,6 +270,11 @@ public: } inline void writeString(const char *s) { + if (!s) { + writeNull(); + return; + } + separator(); escapeUnicodeString(s); value = true; -- 2.7.4