Function write_ndjson
pub fn write_ndjson<W: Write, T: Serialize>(rows: &[T], w: &mut W) -> Result<()>Expand description
Generic NDJSON writer. Each row is emitted via
serde_json::to_writer (compact form) followed by \n.
§Errors
Returns CodeLoreError::Io when the output sink fails mid-write (e.g. a
reader closed the pipe early) and CodeLoreError::Output on a genuine
serialisation fault.