mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Merge pull request #3174 from Jack251970/dev1
Use System.Text.Json to replace Newtonsoft.Json for better performance
This commit is contained in:
commit
5f4d24a26f
1 changed files with 4 additions and 8 deletions
|
|
@ -1,10 +1,9 @@
|
|||
using Flow.Launcher.Core.ExternalPlugins;
|
||||
using Flow.Launcher.Infrastructure.UserSettings;
|
||||
using ICSharpCode.SharpZipLib.Zip;
|
||||
using Newtonsoft.Json;
|
||||
using System.IO;
|
||||
using System.IO.Compression;
|
||||
using System.Linq;
|
||||
using System.Text.Json;
|
||||
|
||||
namespace Flow.Launcher.Plugin.PluginsManager
|
||||
{
|
||||
|
|
@ -72,12 +71,9 @@ namespace Flow.Launcher.Plugin.PluginsManager
|
|||
|
||||
if (pluginJsonEntry != null)
|
||||
{
|
||||
using (StreamReader reader = new StreamReader(pluginJsonEntry.Open()))
|
||||
{
|
||||
string pluginJsonContent = reader.ReadToEnd();
|
||||
plugin = JsonConvert.DeserializeObject<UserPlugin>(pluginJsonContent);
|
||||
plugin.IcoPath = "Images\\zipfolder.png";
|
||||
}
|
||||
using Stream stream = pluginJsonEntry.Open();
|
||||
plugin = JsonSerializer.Deserialize<UserPlugin>(stream);
|
||||
plugin.IcoPath = "Images\\zipfolder.png";
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue