Skip to main content

strip_json5

Function strip_json5 

Source
pub fn strip_json5(text: &str) -> String
Expand description

Reduce JSON5 to JSON: // and /* */ comments outside strings, trailing commas before } / ] (profiles.rs::strip_json5, which the Node codec transcribed; this is the same rule in the crate that owns the codec), and JSON5’s key and string forms OpenClaw’s own configs use: identifier keys (agents: {…}) are quoted and single-quoted strings become double-quoted.