04ac6fa7feb3b9eee15e4238bbf595b79db28cfb kent Thu Jan 30 22:38:39 2014 -0800 Fixed a place where data was sent to stdout instead of specified file. diff --git src/lib/jsonParse.c src/lib/jsonParse.c index 72c968f..e9b49c7 100644 --- src/lib/jsonParse.c +++ src/lib/jsonParse.c @@ -569,31 +569,31 @@ static void printIndentedNameStartCallback(struct jsonElement *ele, char *name, boolean isLast, void *context) { struct jsonPrintContext *jps = context; jsonPrintOneStart(ele, name, isLast, jps->indent, jps->f); jps->indent += jps->indentPer; } static void printIndentedNameEndCallback(struct jsonElement *ele, char *name, boolean isLast, void *context) { struct jsonPrintContext *jps = context; jps->indent -= jps->indentPer; -jsonPrintOneEnd(ele, name, isLast, jps->indent, stdout); +jsonPrintOneEnd(ele, name, isLast, jps->indent, jps->f); } void jsonPrintToFile(struct jsonElement *root, char *name, FILE *f, int indentPer) /* Print out JSON object and all children nicely indented to f as JSON objects. * Name may be NULL. Implemented via jsonPrintOneStart/jsonPrintOneEnd. */ { struct jsonPrintContext jps = {f, 0, indentPer}; jsonElementRecurse(root, NULL, TRUE, printIndentedNameStartCallback, printIndentedNameEndCallback, &jps); } /** Routines that check json type and return corresponding value. **/ struct slRef *jsonListVal(struct jsonElement *ele, char *name) /* Enforce element is type jsonList. Return list value */