Malformed JSON in lshw output under RHEL8
Issue
When running the lshw command with the -json option on a RHEL8 system, the JSON output is malformed.
$ lshw -C display -json
Example of Malformed JSON Output
lshw -C display -json
{
"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",
"logicalname" : "/dev/fb0",
"version" : "00",
"width" : 32,
"clock" : 33000000,
"configuration" : {
"depth" : "32",
"driver" : "vmwgfx",
"latency" : "64",
"resolution" : "1280,800"
},
"capabilities" : {
"vga_controller" : true,
"bus_master" : "bus mastering",
"cap_list" : "PCI capabilities listing",
"rom" : "extension ROM",
"fb" : "framebuffer"
}
},
Environment
Red Hat Enterprise Linux 8
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.