pub fn emit(
value: Value,
format: Format,
pretty: bool,
null_as: Option<&str>,
) -> Result<String>Expand description
Converts the merged IR into format and serializes it.
null_as substitutes a string for every null rather than failing on one.
It is honoured in the TOML arm and nowhere else: JSON can hold a null
perfectly well, so there is nothing there for it to rescue and substituting
anyway would corrupt a document that was never in trouble.
The null pre-check inside value::to_toml is then the only thing that can
fail here, and it reports key paths alone — nothing about the inputs
survives the merge for it to name.