mirror of
https://github.com/Bubuni-Team/telegram-bot.git
synced 2026-07-31 00:29:24 +03:00
Code cleanup
This commit is contained in:
@@ -4,6 +4,7 @@ using System.Diagnostics.CodeAnalysis;
|
||||
using System.IO;
|
||||
using System.Runtime.Serialization.Formatters.Binary;
|
||||
using System.Text.Json;
|
||||
using System.Text.Json.Serialization;
|
||||
using System.Xml.Serialization;
|
||||
|
||||
namespace Kruzya.TelegramBot.Core.Data
|
||||
@@ -35,7 +36,7 @@ namespace Kruzya.TelegramBot.Core.Data
|
||||
public void SetValue<T>(T value)
|
||||
{
|
||||
Value = JsonSerializer.SerializeToUtf8Bytes(value, new JsonSerializerOptions { WriteIndented = false,
|
||||
IgnoreNullValues = true });
|
||||
DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull });
|
||||
ValueType = value.GetType().FullName;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user