Sfoglia il codice sorgente

HPCC-11259 Fix toJSON output for empty property tree

Signed-off-by: Anthony Fishbeck <anthony.fishbeck@lexisnexis.com>
Anthony Fishbeck 11 anni fa
parent
commit
3cbd0b37e1
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1 1
      system/jlib/jptree.cpp

+ 1 - 1
system/jlib/jptree.cpp

@@ -5585,7 +5585,7 @@ static void _toJSON(const IPropertyTree *tree, IIOStream &out, unsigned indent,
             isNull = (NULL == (thislevel = tree->queryProp(NULL)));
     }
 
-    if (isNull && !complex)
+    if (isNull && !root && !complex)
     {
         writeJSONValueToStream(out, NULL, delimit);
         return;