commit | 02bf5b48c041ef6fb575953b911e4268a44a9a9f | [log] [tgz] |
---|---|---|
author | José Fonseca <jose.r.fonseca@gmail.com> | Tue Oct 11 19:33:02 2011 +0100 |
committer | José Fonseca <jose.r.fonseca@gmail.com> | Tue Oct 11 20:29:34 2011 +0100 |
tree | c434a3add68f9c2ec732e18a32d2135cd6d62bd4 | |
parent | aa5681e4e7a6c0b60cf4bd05a1b80181c98547f7 [diff] [blame] |
Handle null strings in json writer.
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 @@ } inline void writeString(const char *s) { + if (!s) { + writeNull(); + return; + } + separator(); escapeUnicodeString(s); value = true;