Skip to content

Commit ad02700

Browse files
committed
Use System.Text.Json to replace Newtonsoft.Json for better performance
1 parent 7cccbb0 commit ad02700

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

Plugins/Flow.Launcher.Plugin.PluginsManager/Utilities.cs

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
using Flow.Launcher.Core.ExternalPlugins;
2-
using Flow.Launcher.Infrastructure.UserSettings;
32
using ICSharpCode.SharpZipLib.Zip;
4-
using Newtonsoft.Json;
53
using System.IO;
64
using System.IO.Compression;
75
using System.Linq;
6+
using System.Text.Json;
87

98
namespace Flow.Launcher.Plugin.PluginsManager
109
{
@@ -72,12 +71,10 @@ internal static UserPlugin GetPluginInfoFromZip(string filePath)
7271

7372
if (pluginJsonEntry != null)
7473
{
75-
using (StreamReader reader = new StreamReader(pluginJsonEntry.Open()))
76-
{
77-
string pluginJsonContent = reader.ReadToEnd();
78-
plugin = JsonConvert.DeserializeObject<UserPlugin>(pluginJsonContent);
79-
plugin.IcoPath = "Images\\zipfolder.png";
80-
}
74+
using StreamReader reader = new StreamReader(pluginJsonEntry.Open());
75+
string pluginJsonContent = reader.ReadToEnd();
76+
plugin = JsonSerializer.Deserialize<UserPlugin>(pluginJsonContent);
77+
plugin.IcoPath = "Images\\zipfolder.png";
8178
}
8279
}
8380

0 commit comments

Comments
 (0)