Refactor config to JSON data class pattern

Refactor the Config and ConfigGroup classes to match the JSON data class
pattern with toJSON, toRemote and fromJSON methods replacing the load,
init, and serialize methods.  Since fromJSON requires extra information
the messages structures passes around the plain JSON representation of
the configs instead of serialising instances of the config classes
automatically.
This commit is contained in:
Hornwitser committed 2024-01-06 19:53:32 +01:00
1 parent 27af142a87
commit 001db4befe
24 files changed
+269 -334

No files matched your search

@@ -14,8 +14,7 @@ export default function InstanceConfigTree(props: InstanceConfigTreeProps) {
let control = useContext(ControlContext);
async function retrieveConfig() {
let result = await control.send(new lib.InstanceConfigGetRequest(props.id));
return result.serializedConfig;
return await control.send(new lib.InstanceConfigGetRequest(props.id));
}
async function setField(field: string, value: any) {