Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Now also flushes when a ] character is encountered when the indent le…

…vel is 0.
  • Loading branch information...
commit 10176029d40354844eeaf515f952ded8a686f6fe 1 parent 7ff8254
Ben Souther authored
Showing with 2 additions and 1 deletion.
  1. +2 −1  src/jsonf.c
View
3  src/jsonf.c
@@ -49,13 +49,14 @@ void process_fp(FILE *fp) {
}
}
+
last=c;
if (instr || !(' ' == c || '\t' == c || '\r' == c || '\n' == c)){
printf("%c",c);
}
/* Should the end of the JSON document. Flush stdout */
- if(level <= 0 && c == '}'){
+ if(level <= 0 && (c == '}' || c == ']' )){
fflush(stdout);
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.