util-linux/libsmartcols
Karel Zak 3c7355dd63 libsmartcols: support arrays for JSON output
This patch add support to format multi-line cells (columns with
SCOLS_FL_WRAP) to arrays in JSON output.

For example mountpoints[] in lsblk output:

Normal output:
	 $ lsblk -oNAME,FSTYPE,TYPE,MOUNTPOINTS /dev/sdc1
	 NAME FSTYPE TYPE MOUNTPOINTS
	 sdc1 btrfs  part /mnt/A
			  /mnt/test
			  /mnt/B

JSON output:
	$ lsblk -J -oNAME,FSTYPE,TYPE,MOUNTPOINTS /dev/sdc1
	{
	   "blockdevices": [
	      {
		 "name": "sdc1",
		 "fstype": "btrfs",
		 "type": "part",
		 "mountpoints": [
		     "/mnt/A",
		     "/mnt/test",
		     "/mnt/B"
		 ]
	      }
	   ]
	}

Signed-off-by: Karel Zak <kzak@redhat.com>
2021-01-08 13:12:57 +01:00
..
docs libsmartcols: (docs) add missing references 2020-07-22 10:34:14 +02:00
samples libsmartcols: (sample) remove unused variable 2020-07-14 12:32:56 +02:00
src libsmartcols: support arrays for JSON output 2021-01-08 13:12:57 +01:00
COPYING docs: use SPDX license names 2018-08-16 14:47:21 +02:00
Makemodule.am libsmartcols: add samples directory 2016-01-25 13:17:43 +01:00
smartcols.pc.in