applyDelta

fun applyDelta(currentStateJson: String, moduleName: String, deltaJson: String): String

Applies a single module delta to the current full state JSON.

Return

Updated full state JSON string with the module key replaced

Parameters

currentStateJson

The current full state as a JSON string (object with module keys)

moduleName

The module key whose state changed

deltaJson

The new state for that module as a JSON string