JsonUpdateStrategy

class JsonUpdateStrategy : UpdateStrategy

Default UpdateStrategy implementation for JSON configuration files.

This strategy updates an existing JSON configuration file by merging it with the default configuration resource, preserving user-defined values while adding new keys or updating missing entries.

Typically used internally by the JSON parser module.

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
open override fun updateIfNeeded(context: UpdateContext): Boolean

Checks whether the current config file is outdated compared to the default version. If outdated, merges missing or new keys from the default config into the current file, preserving user changes, then writes the updated config back to disk.