1
0
mirror of https://github.com/JKorf/CryptoExchange.Net synced 2025-07-25 02:45:22 +00:00

Fix BoolConverter writing

This commit is contained in:
JKorf 2024-04-03 09:49:34 +02:00
parent 3cdcf0d9be
commit 85dad6f6f0

View File

@ -74,7 +74,10 @@ namespace CryptoExchange.Net.Converters.SystemTextJson
public override void Write(Utf8JsonWriter writer, T value, JsonSerializerOptions options) public override void Write(Utf8JsonWriter writer, T value, JsonSerializerOptions options)
{ {
writer.WriteNullValue(); if (value is bool boolVal)
writer.WriteBooleanValue(boolVal);
else
writer.WriteNullValue();
} }
} }