Class ServerConfigFile
Loads and saves ServerConfig as human-editable JSON. Missing files are created with defaults; an existing file is parsed then rewritten so newly added fields appear and formatting stays canonical. A malformed file is NOT overwritten, the error propagates so the operator can fix it.
public static class ServerConfigFile
- Inheritance
-
ServerConfigFile
- Inherited Members
Fields
DefaultPath
public const string DefaultPath = "config.json"
Field Value
Methods
LoadOrCreate(string)
Load the config at path, creating it with defaults if absent.
public static ServerConfig LoadOrCreate(string path)
Parameters
pathstring
Returns
Save(string, ServerConfig)
public static void Save(string path, ServerConfig config)
Parameters
pathstringconfigServerConfig