]> granicus.if.org Git - icinga2/commitdiff
Allow comments in JSON
authorGunnar Beutner <gunnar@beutner.name>
Mon, 17 Aug 2015 06:03:25 +0000 (08:03 +0200)
committerGunnar Beutner <gunnar@beutner.name>
Mon, 17 Aug 2015 06:03:25 +0000 (08:03 +0200)
fixes #9919

lib/base/json.cpp

index 7bdda7b921b2e96efdb1e2014279d339b4cd82fe..a2bd25631c4204a2f02e9a691400a396c0b409ff 100644 (file)
@@ -333,6 +333,7 @@ Value icinga::JsonDecode(const String& data)
 #else /* YAJL_MAJOR */
        handle = yajl_alloc(&callbacks, NULL, &context);
        yajl_config(handle, yajl_dont_validate_strings, 1);
+       yajl_config(handle, yajl_allow_comments, 1);
 #endif /* YAJL_MAJOR */
 
        yajl_parse(handle, reinterpret_cast<const unsigned char *>(data.CStr()), data.GetLength());