Skip to main content

Module settings_jsonc

Module settings_jsonc 

Source
Expand description

Reading settings.json the way srv does: JSONC, so // and /* */ comments and trailing commas are allowed. The seeded template has both, so a reader that parses strict JSON gets nothing from a seeded file (#1903).

Functions§

dev_mode_from
Dev mode (app:devmode, docs/specs/SPEC_DEV_MODE_SETTING_2026_10_28.md) from the text of settings.json (None: no such file): the key when it is a boolean, otherwise dev_build, whether this is a task dev or debug build. The host checks this before it opens DevTools.
parse_jsonc
text as JSONC, or None when it isn’t valid even then.
strip_trailing_commas
input with each comma that ends an object or array blanked out, leaving commas inside strings alone.