Personally, I'm still seeing an issue related to commas in json output on Bionic.
$ apt show lshw 2>/dev/null | head -n2 Package: lshw Version: 02.18-0.1ubuntu6.18.04.2
$ sudo lshw -C display -json | jq { "id": "display", "class": "display", "claimed": true, "handle": "PCI:0000:00:0f.0", "description": "VGA compatible controller", "product": "SVGA II Adapter", "vendor": "VMware", "physid": "f", "businfo": "pci@0000:00:0f.0", "version": "00", "width": 32, "clock": 33000000, "configuration": { "driver": "vmwgfx", "latency": "64" }, "capabilities": { "vga_controller": true, "bus_master": "bus mastering", "cap_list": "PCI capabilities listing", "rom": "extension ROM" } } parse error: Expected value before ',' at line 24, column 4
===
It's basically a spurious comma at the end ouf the output
$ sudo lshw -C display -json # ...[several spurious newlines] { "id" : "display", "class" : "display", "claimed" : true, "handle" : "PCI:0000:00:0f.0", "description" : "VGA compatible controller", "product" : "SVGA II Adapter", "vendor" : "VMware", "physid" : "f", "businfo" : "pci@0000:00:0f.0", "version" : "00", "width" : 32, "clock" : 33000000, "configuration" : { "driver" : "vmwgfx", "latency" : "64" }, "capabilities" : { "vga_controller" : true, "bus_master" : "bus mastering", "cap_list" : "PCI capabilities listing", "rom" : "extension ROM" } },
Personally, I'm still seeing an issue related to commas in json output on Bionic.
$ apt show lshw 2>/dev/null | head -n2 1ubuntu6. 18.04.2
Package: lshw
Version: 02.18-0.
$ sudo lshw -C display -json | jq controller" : true,
{
"id": "display",
"class": "display",
"claimed": true,
"handle": "PCI:0000:00:0f.0",
"description": "VGA compatible controller",
"product": "SVGA II Adapter",
"vendor": "VMware",
"physid": "f",
"businfo": "pci@0000:00:0f.0",
"version": "00",
"width": 32,
"clock": 33000000,
"configuration": {
"driver": "vmwgfx",
"latency": "64"
},
"capabilities": {
"vga_
"bus_master": "bus mastering",
"cap_list": "PCI capabilities listing",
"rom": "extension ROM"
}
}
parse error: Expected value before ',' at line 24, column 4
===
It's basically a spurious comma at the end ouf the output
$ sudo lshw -C display -json vga_controller" : true,
# ...[several spurious newlines] {
"id" : "display",
"class" : "display",
"claimed" : true,
"handle" : "PCI:0000:00:0f.0",
"description" : "VGA compatible controller",
"product" : "SVGA II Adapter",
"vendor" : "VMware",
"physid" : "f",
"businfo" : "pci@0000:00:0f.0",
"version" : "00",
"width" : 32,
"clock" : 33000000,
"configuration" : {
"driver" : "vmwgfx",
"latency" : "64"
},
"capabilities" : {
"
"bus_master" : "bus mastering",
"cap_list" : "PCI capabilities listing",
"rom" : "extension ROM"
}
},