Plistt
Rust 2021
Plistt a rust library and command-line tool to convert xml-encoded plist data into json.
Plistt in action
[]
= { = "0.1.1" }
use json;
use ;
use OpenOptions;
use ;
use Command;
use Path;
Plistt a rust library and command-line tool to convert xml-encoded plist data into json.
[dependencies]
plistt = { version = "0.1.1" }
use plistt::json;
use plistt::{BufReader, BufWriter};
use std::fs::OpenOptions;
use std::io::{Cursor};
use std::process::Command;
use std::path::Path;
fn main() {
let ioreg = Command::new("ioreg")
.arg("-c")
.arg("IOUSB")
.arg("-a")
.output()
.unwrap();
let input = BufReader::new(Cursor::new(ioreg.stdout));
let stdout = OpenOptions::new()
.write(true)
.open(Path::new("/dev/stdout"))
.unwrap();
let output = BufWriter::new(stdout);
json::transcode_from_xml_reader(input, output)
}