Skip to main content

parse_json

Function parse_json 

Source
pub fn parse_json(json: &Value, device: &str) -> SmartDevice
Expand description

Extracts the fields rigtop shows from smartctl -j -a output.

device names the drive; when empty, the last component of the JSON’s device.name (e.g. /dev/nvme0 -> nvme0) is used.