From a4a6a9712e30654f4a02f90817a65d2ac1212c78 Mon Sep 17 00:00:00 2001 From: RythonDev <50455574+liyunze-coding@users.noreply.github.com> Date: Mon, 26 Jan 2026 01:41:11 +1100 Subject: [PATCH] Add JSON deserialization example for TestClass list Added example for deserializing JSON string into a list of TestClass objects. --- streamerbot/3.api/3.csharp/0.guide/1.variables.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/streamerbot/3.api/3.csharp/0.guide/1.variables.md b/streamerbot/3.api/3.csharp/0.guide/1.variables.md index 04153c00..4095d23f 100644 --- a/streamerbot/3.api/3.csharp/0.guide/1.variables.md +++ b/streamerbot/3.api/3.csharp/0.guide/1.variables.md @@ -145,6 +145,10 @@ public class TestClass List testList = new List(){...}; string jsonSaveString = JsonConvert.SerializeObject(testList); CPH.SetGlobalVar("savingClass", jsonSaveString, true); + +//... Deserializing saved JSON string +string savedString = CPH.GetGlobalVar("savingClass", true); +List savedList = JsonConvert.DeserializeObject>(savedString); ``` ## Special Arguments