Fixed some issues with SettingsDictionary
This commit is contained in:
@@ -41,11 +41,13 @@ public class JsonManager
|
||||
text = new MemoryStream(await File.ReadAllBytesAsync(input));
|
||||
else
|
||||
text = new MemoryStream(Encoding.ASCII.GetBytes(input));
|
||||
|
||||
text.Position = 0;
|
||||
|
||||
var obj = await JsonSerializer.DeserializeAsync<T>(text);
|
||||
await text.FlushAsync();
|
||||
text.Close();
|
||||
|
||||
return (obj ?? default)!;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user