Class
JsonConfigurationProvider
class JsonConfigurationProvider
Module: Neo.Configuration.Json
Assembly: Neo.Configuration.Json.dll
Source file: JsonConfiguration.rvn
Inheritance: Object → JsonConfigurationProvider
Implements: ConfigurationProvider, Disposable
Reads UTF-8 JSON objects into colon-delimited configuration keys. Accepts comments and trailing commas, with maximum depth 64 and a 1 MiB input limit.
Constructors
1 item
JsonConfigurationProvider(path: string, optional?: bool, reloadOnChange?: bool)
Configures file loading; optional and automatic reload are disabled by default. Optional suppresses only NotFound. Reloads run after a 250 ms quiet period.
Properties
4 items
LastReloadError: Optional<JsonConfigurationError>
Most recent background reload failure; a successful background reload clears it.
Optional: bool
No summary available.
Path: string
No summary available.
ReloadOnChange: bool
Whether TryLoad establishes automatic file watching; false by default.
Methods
11 items
Dispose() -> ()
Stops automatic reload permanently. Retained values remain readable; loading returns Disposed.
Implements Disposable.Dispose
Equals(other: object?) -> bool
Tests reference identity by default; an ordinary class may override equality.
Inherited from Object.Equals
Find(key: string) -> Optional<string?>
Reads an effective flattened key; Some(null) is a present null value.
Implements ConfigurationProvider.Find
GetChildKeys(parentPath: string?) -> Sequence<string>
Returns sorted immediate children of the flattened document.
Implements ConfigurationProvider.GetChildKeys
GetHashCode() -> int
Returns a stable identity hash by default; an ordinary class may override it consistently with equality.
Inherited from Object.GetHashCode
GetType() -> TypeInfo
Returns metadata for the concrete runtime type of this instance.
Inherited from Object.GetType
Load() -> ()
Loads the file or faults. Use TryLoad to handle diagnostics as a Result.
Implements ConfigurationProvider.Load
LoadText(json: string) -> Result<void, JsonConfigurationError>
Parses supplied JSON instead of reading the file; failed parsing preserves previous values. Later Load/TryLoad reads Path again. Numeric spelling is preserved; booleans use True/Fa…
Set(key: string, value: string?) -> ()
Changes only in-memory data; Load restores file data. Does not rewrite the file.
Implements ConfigurationProvider.Set
ToString() -> string
Returns the concrete runtime type name for supported references, or display text from a class or boxed-struct override.
Inherited from Object.ToString
TryLoad() -> Result<void, JsonConfigurationError>
Reads the file and atomically replaces data on success; failures leave prior data intact.