]> git.ipfire.org Git - thirdparty/util-linux.git/commit
lib/jsonwrt: introduce ul_jsonwrt_empty()
authorKarel Zak <kzak@redhat.com>
Wed, 3 Apr 2024 11:57:18 +0000 (13:57 +0200)
committerKarel Zak <kzak@redhat.com>
Wed, 3 Apr 2024 11:57:18 +0000 (13:57 +0200)
commitb649ff92d2d91864e85a5bba4c89d52236817d9e
tree99ca0c000d32c0590f0824fbfc70da32312d22a6
parentacdba9c454506cdd29ac400df3f72bde4c74647d
lib/jsonwrt: introduce ul_jsonwrt_empty()

The new function optimizes the printing of empty objects and arrays in
a "pretty" way, instead of using the ul_jsonwrt_..._open() and
ul_jsonwrt_..._close() functions, which add extra line breaks to the
output.

Signed-off-by: Karel Zak <kzak@redhat.com>
include/jsonwrt.h
lib/jsonwrt.c