libsmartcols: improve JSON
Signed-off-by: Karel Zak <kzak@redhat.com>
This commit is contained in:
parent
346e3a40a0
commit
65f3ebc334
|
@ -725,7 +725,7 @@ int scols_table_set_symbols(struct libscols_table *tb,
|
|||
*
|
||||
* Enable/disable line separator printing. This is useful if you want to
|
||||
* re-printing the same line more than once (e.g. progress bar). Don't use it
|
||||
* if you're not sure. This option may be ignored for JSON output.
|
||||
* if you're not sure.
|
||||
*
|
||||
* Returns: 0 on success, negative number in case of an error.
|
||||
*/
|
||||
|
|
|
@ -684,7 +684,8 @@ static void fput_line_close(struct libscols_table *tb, int last, int last_in_tab
|
|||
if (tb->indent_last_sep)
|
||||
fput_indent(tb);
|
||||
fputs(last ? "}" : "},", tb->out);
|
||||
fputs(linesep(tb), tb->out);
|
||||
if (!tb->no_linesep)
|
||||
fputs(linesep(tb), tb->out);
|
||||
|
||||
} else if (tb->no_linesep == 0 && last_in_table == 0)
|
||||
fputs(linesep(tb), tb->out);
|
||||
|
|
Loading…
Reference in New Issue