2
0
mirror of https://github.com/9ParsonsB/Pulsar.git synced 2025-12-15 20:34:58 +01:00

Update Journal File Handling

Now Correctly deserializes Journal events
This commit is contained in:
2024-05-12 12:55:28 +10:00
parent e59ca066ab
commit bd811c861c
29 changed files with 714 additions and 442 deletions

View File

@@ -7,13 +7,13 @@ public class IntBoolFlexConverter : JsonConverter<bool>
{
public override bool Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
{
if (reader.TokenType == JsonTokenType.Number)
return reader.GetInt16() == 1;
return reader.GetBoolean();
}
if (reader.TokenType == JsonTokenType.Number)
return reader.GetInt16() == 1;
return reader.GetBoolean();
}
public override void Write(Utf8JsonWriter writer, bool value, JsonSerializerOptions options)
{
writer.WriteBooleanValue(value);
}
writer.WriteBooleanValue(value);
}
}