JsonConverter
This commit is contained in:
parent
2d47aa7492
commit
67bb9c4f9a
@ -7,7 +7,7 @@
|
||||
<Authors>Glax</Authors>
|
||||
<RepositoryUrl>https://github.com/C9Glax/CShocker</RepositoryUrl>
|
||||
<RepositoryType>git</RepositoryType>
|
||||
<Version>1.3.1</Version>
|
||||
<Version>1.3.2</Version>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
@ -29,6 +29,12 @@ public class ShockerJsonConverter : JsonConverter
|
||||
jo.SelectToken("Endpoint")!.Value<string>()!
|
||||
);
|
||||
case ShockerApi.OpenShockSerial:
|
||||
return new OpenShockSerial(
|
||||
jo.SelectToken("Model")!.ToObject<Dictionary<string, OpenShockSerial.ShockerModel>>()!,
|
||||
jo.SelectToken("IntensityRange")!.ToObject<IntensityRange>()!,
|
||||
jo.SelectToken("DurationRange")!.ToObject<DurationRange>()!,
|
||||
jo.SelectToken("SerialPortI")!.ToObject<SerialShocker.SerialPortInfo>()!
|
||||
);
|
||||
case ShockerApi.PiShockHttp:
|
||||
return new PiShockHttp(
|
||||
jo.SelectToken("ShockerIds")!.ToObject<List<string>>()!,
|
||||
|
Loading…
Reference in New Issue
Block a user