f2b6a945eb6990470e8a4435b980fa22aa567b11 angie Fri Sep 11 13:28:00 2015 -0700 When a NULL tag ("var") was passed to jsonListStart, it wasn't printing the preceding comma if one was needed. To make NULL tag universally supported by everything that calls jsonWriteTag, change jsonWriteTag to always print the preceding comma if necessary, and print the tag only if non-NULL. diff --git src/lib/jsonWrite.c src/lib/jsonWrite.c index 9669899..ce342fc 100644 --- src/lib/jsonWrite.c +++ src/lib/jsonWrite.c @@ -1,237 +1,226 @@ /* jsonWrite - Helper routines for writing out JSON. */ /* Copyright (C) 2014 The Regents of the University of California * See README in this or parent directory for licensing information. */ #include "common.h" #include "hash.h" #include "dystring.h" #include "sqlNum.h" #include "jsonParse.h" #include "jsonWrite.h" // Separator between elements; set this to "\n" to see elements on separate lines. // Newlines are fine in Javascript, e.g. in an embedded