pub fn parse_jsonc(input: &str) -> Result<Value, Error>Expand description
Strip // line comments, /* */ block comments and trailing commas from
JSONC, then parse with serde_json. String contents are preserved verbatim.
This makes lean-ctx tolerant of the JSONC dialect that editors like VS Code
use for settings.json / mcp.json (comments + trailing commas are valid
there but rejected by strict JSON). See issue #311.
A single leading UTF-8 BOM is also accepted. Windows editors emit it routinely, serde_json rejects it, and callers used to read that rejection as “config is corrupt” and scaffold a fresh one over the user’s file (#1586).