pub fn encode(json: &str) -> Result<String>
Encode a JSON string into TOON v3.0 format.
Parses the input as JSON, then walks the value tree to produce a compact TOON representation. Returns an error if the input is not valid JSON.