Replace JSON.NET with System.Text.json (#840)

This commit is contained in:
RobertBeekman authored and GitHub committed 2024-02-28 19:31:38 +01:00
1 parent e112ca9da8
commit a340f8822e
63 files changed
+466 -584

No files matched your search

@@ -24,6 +24,6 @@ public static class ClipboardExtensions
public static async Task<T?> GetJsonAsync<T>(this IClipboard clipboard, string format)
{
byte[]? bytes = (byte[]?) await clipboard.GetDataAsync(format);
return bytes == null ? default : CoreJson.DeserializeObject<T>(Encoding.Unicode.GetString(bytes), true);
return bytes == null ? default : CoreJson.Deserialize<T>(Encoding.Unicode.GetString(bytes).TrimEnd('\0'));
}
}