Skip to content

Commit

Permalink
Refactor Telegram bridge json models
Browse files Browse the repository at this point in the history
  • Loading branch information
fembina committed Nov 14, 2024
1 parent 3035b4d commit 1a3354d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ namespace Talkie.Bridges.Telegram.Serialization;
DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull,
PropertyNamingPolicy = JsonKnownNamingPolicy.SnakeCaseLower,
DictionaryKeyPolicy = JsonKnownNamingPolicy.SnakeCaseLower,
Converters = [typeof(DateTimeUnixConverter), typeof(ReadOnlyStringsToTextOrNumberDictionaryConverter)])]
Converters = [typeof(DateTimeUnixConverter), typeof(TextOrNumberValueDictionaryConverter)])]
[JsonSerializable(typeof(TelegramResponse<TelegramUpdate[]>))]
[JsonSerializable(typeof(TelegramResponse<TelegramUser>))]
[JsonSerializable(typeof(TelegramResponse<TelegramMessage>))]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

namespace Talkie.Bridges.Telegram.Serialization;

internal sealed class ReadOnlyStringsToTextOrNumberDictionaryConverter
internal sealed class TextOrNumberValueDictionaryConverter
: JsonConverter<IReadOnlyDictionary<string, TextOrNumberValue>>
{
public override IReadOnlyDictionary<string, TextOrNumberValue> Read(ref Utf8JsonReader reader,
Expand Down

0 comments on commit 1a3354d

Please sign in to comment.