pub fn write_frame(w: &mut impl Write, value: &impl Serialize) -> Result<()>
Writes one length-prefixed JSON frame without allowing unbounded allocation.