Function persy_expimp::export_json_from_snapshot
source · Expand description
Export the data from a persy storage with using JSON format
Example
use persy::{Persy, Config};
use persy_expimp::export_json_from_snapshot;
use std::vec::Vec;
use std::fs::OpenOptions;
let persy = Persy::open("file.persy", Config::new())?;
let snapshot = persy.snapshot()?;
let mut output = OpenOptions::new().write(true).create(true).open("dest.json")?;
export_json_from_snapshot(&snapshot, &mut output)?;