Skip to content

Commit a0ef8e6

Browse files
Add ability to Serialize/Deserialize ZWaveOptions
1 parent d513236 commit a0ef8e6

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

Visual Studio Projects/ZWaveJS.NET/ZWaveJS.NET/ZWaveOptions.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,16 @@ public ZWaveOptions()
2020

2121
}
2222

23+
public string Serialize()
24+
{
25+
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
26+
}
27+
28+
public static ZWaveOptions FromSerialized(string JSON)
29+
{
30+
return Newtonsoft.Json.JsonConvert.DeserializeObject<ZWaveOptions>(JSON);
31+
}
32+
2333
public CFGTimeouts timeouts { get; set; }
2434
public CFGAttempts attempts { get; set; }
2535
public CFGLogConfig logConfig { get; set; }

0 commit comments

Comments
 (0)