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:
@@ -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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user