Skip to main content

to_yaml

Function to_yaml 

Source
pub fn to_yaml(value: &Value) -> String
Expand description

Convert a JSON Value into a YAML document.

Strings are always quoted to avoid YAML pitfalls (nofalse, 3.0 → float). Values are preserved as-is — no suffix-driven transformation. Starts with --- for multi-document streaming compatibility.