2
0
mirror of https://github.com/9ParsonsB/Pulsar.git synced 2025-07-01 08:23:42 -04:00

API & WebSocket now working

Can Read Status File & Broadcast contents via websocket
This commit is contained in:
2024-04-18 14:45:16 +10:00
parent aa368471fe
commit ac30d3cd2a
18 changed files with 345 additions and 383 deletions

View File

@ -7,13 +7,13 @@ class PipConverter : JsonConverter<(int Sys, int Eng, int Wep)>
{
public override (int Sys, int Eng, int Wep) Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
{
var values = (int[])JsonSerializer.Deserialize(ref reader, typeof(int[]));
var values = JsonSerializer.Deserialize<int[]>(ref reader);
return (Sys: values[0], Eng: values[1], Wep: values[2]);
}
public override void Write(Utf8JsonWriter writer, (int Sys, int Eng, int Wep) value, JsonSerializerOptions options)
{
throw new NotImplementedException();
JsonSerializer.Serialize(writer, new[] { value.Sys, value.Eng, value.Wep });
}
}