]> git.ipfire.org Git - thirdparty/util-linux.git/commit
lslogins: add JSON output format mode
authorChristian Goeschel Ndjomouo <cgoesc2@wgu.edu>
Sat, 11 Oct 2025 15:56:30 +0000 (11:56 -0400)
committerChristian Goeschel Ndjomouo <cgoesc2@wgu.edu>
Sat, 11 Oct 2025 22:25:39 +0000 (18:25 -0400)
commitfb554244e2cdd9f5e787d07589ffc4939716cd0e
tree1f8f74da572e5c2caed002c68e2181d6ab7de282
parentdb0efab5c3e13794ae79fcb3db8371e3af510169
lslogins: add JSON output format mode

This adds the -J and --json options that enable JSON output mode
for the libsmartcols table. JSON output can be especially useful if
another program wants to consume lslogins's data in an easily parse-
able and language independent format.

Each keys's value will be converted into an appropriate JSON data
type, i.e. integers are numbers, empty values are null and others
are strings.

Signed-off-by: Christian Goeschel Ndjomouo <cgoesc2@wgu.edu>
login-utils/lslogins.c