1 2 3 4 5 6 7
use crate::entry::Entry; use std::io::{self, Write}; pub fn write(w: &mut impl Write, entries: &[&Entry]) -> io::Result<()> { let json = serde_json::to_string_pretty(entries).map_err(io::Error::other)?; writeln!(w, "{}", json) }