Skip to main content

Module settings_read

Module settings_read 

Source
Expand description

Reading settings.json one key at a time: a value that is the wrong type or outside its range uses that key’s default and is reported, and every other key applies (docs/specs/SPEC_SETTINGS_JSON_EVERY_KEY_ONE_TO_ONE_2026_11_01.md §5.5).

Before, one bad value failed the whole file: a reload kept the old settings and a first load ran on the defaults. Only a file that is not one JSON object at all is still unreadable.

Structs§

SettingsRead
What settings.json gave.

Functions§

read_settings_file
Read settings.json: JSONC, with or without a byte-order mark. A missing file is the defaults.
read_settings_text
content as read_settings_file reads it, for bytes the caller already holds.