using System.Text.Json;
class FileVerification
{
private readonly string quackenFilePath = @"C:\Users\maske\Documents\dev\CSharp\TelegramBots\quacken.json";
private readonly JsonSerializerOptions _options = new()
{
PropertyNameCaseInsensitive = true
};
public List<QuackenJson> JsonReadWithSystemText()
{
using FileStream json = File.OpenRead(quackenFilePath);
List<QuackenJson> token = JsonSerializer.Deserialize<List<QuackenJson>>(json, _options)!;
return token;
}
}
using System.Text.Json;
class FileVerification
{
private readonly string quackenFilePath = @"C:\Users\maske\Documents\dev\CSharp\TelegramBots\quacken.json";
private readonly JsonSerializerOptions _options = new()
{
PropertyNameCaseInsensitive = true
};
public List<QuackenJson> JsonReadWithSystemText()
{
using FileStream json = File.OpenRead(quackenFilePath);
List<QuackenJson> token = JsonSerializer.Deserialize<List<QuackenJson>>(json, _options)!;
return token;
}
}