Still broken:
$ sudo lshw -json -C network | jq .
{
"id": "network",
"class": "network",
...
"100bt-fd": "100Mbit/s (full duplex)",
"1000bt-fd": "1Gbit/s (full duplex)",
"autonegotiation": "Auto-negotiation"
}
}
parse error: Expected value before ',' at line 48, column 4
$
Note that there is no leading [
$ sudo lshw -json -C network | head -5
{
"id"; : "network",
"class"; : "network",
"claimed" : true,
"handle" : "PCI:0000:00:19.0",
But there is a comma at line 48. Why is jq failing there? Because
there is no [. If I insert one, then the problem disappears.
$ sudo lshw -json -C network | head -52 | tail -6
}
},
{
"id"; : "network",
"class" : "network",
"claimed" : true,
Note that there is no ] at the end of the file, which also causes jq to
fail.
$ sudo lshw -json -C network | tail -6
},
"capabilities" : {
"ethernet" : true,
"physical" : "Physical interface"
}
}
$
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1405873
Title:
-json output not valid when -class filter used
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/lshw/+bug/1405873/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs