gregkh / usbutils

USB utilities for Linux, including lsusb
http://www.linux-usb.org
356 stars 202 forks source link

output json #141

Closed hadmut closed 2 years ago

hadmut commented 2 years ago

Hi,

the output of lsusb is human readable, but it would be nice, if it had a flag to print its knowledge about devices in a machine readable form, e.g. json, for easy parsing from other programs.

regards

gregkh commented 2 years ago

Yes, that would be a nice feature, and one that is in the long-term plan. But for now, the output is tied strongly to text-only.

Also, look at some of the fields that the -v output shows for devices, putting that into a json scheme is going to be quite difficult.

But as always, patches are gladly accepted and reviewed!