casting magic
This commit is contained in:
parent
6a28755311
commit
bd82a7e0e9
@ -7,7 +7,7 @@
|
||||
<Authors>Glax</Authors>
|
||||
<RepositoryUrl>https://github.com/C9Glax/CShocker</RepositoryUrl>
|
||||
<RepositoryType>git</RepositoryType>
|
||||
<Version>1.1.8</Version>
|
||||
<Version>1.1.9</Version>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
@ -16,7 +16,7 @@ public class ShockerJsonConverter : JsonConverter
|
||||
public override object ReadJson(JsonReader reader, Type objectType, object? existingValue, JsonSerializer serializer)
|
||||
{
|
||||
JObject jo = JObject.Load(reader);
|
||||
ShockerApi? apiType = jo.SelectToken("ApiType")?.Value<ShockerApi>();
|
||||
ShockerApi? apiType = (ShockerApi?)jo.SelectToken("ApiType")?.Value<byte>();
|
||||
|
||||
switch (apiType)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user