Skip to main content

encode

Function encode 

Source
pub fn encode(json: &str) -> Result<String>
Expand description

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.