ConfigBuilder¶
Import: import system.config;
Read the usage guide for examples and common tasks. This reference lists the public declarations for this part of the library. See Reading API signatures for parameter and result notation.
ConfigBuilder¶
Merges defaults, JSON files, environment variables, and explicit CLI values in that order.
constructor¶
Creates an empty builder; source precedence is independent of method call order.
default_value¶
Registers a known setting and its lowest-precedence default.
require¶
Adds a required known setting with no default.
json_file¶
Adds a JSON object file; later files override earlier files.
environment¶
Reads known settings from prefix plus the uppercase key, with hyphens replaced by underscores.
cli¶
Uses explicitly supplied command-line arguments, excluding parser defaults.
validate¶
Adds a value predicate; false returns a provenance-aware validation error.
build¶
Loads and validates a snapshot; failures never change a previously built configuration.