From 7b134528f45810bdb1daf67a4efc9ba94fbb62f5 Mon Sep 17 00:00:00 2001 From: Abrynos <6608231+Abrynos@users.noreply.github.com> Date: Sat, 5 Oct 2024 09:59:03 +0200 Subject: [PATCH] Revert JSON serialization to how it was with Newtonsoft --- ArchiSteamFarm/Helpers/Json/JsonUtilities.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ArchiSteamFarm/Helpers/Json/JsonUtilities.cs b/ArchiSteamFarm/Helpers/Json/JsonUtilities.cs index fcbc9dfcd5bc5..5b8ab807dd31d 100644 --- a/ArchiSteamFarm/Helpers/Json/JsonUtilities.cs +++ b/ArchiSteamFarm/Helpers/Json/JsonUtilities.cs @@ -26,6 +26,7 @@ using System.IO; using System.Linq; using System.Reflection; +using System.Text.Encodings.Web; using System.Text.Json; using System.Text.Json.Serialization.Metadata; using System.Threading; @@ -112,6 +113,7 @@ private static void ApplyCustomModifiers(JsonTypeInfo jsonTypeInfo) { private static JsonSerializerOptions CreateDefaultJsonSerializerOptions(bool writeIndented = false) => new() { AllowTrailingCommas = true, + Encoder = JavaScriptEncoder.UnsafeRelaxedJsonEscaping, PropertyNamingPolicy = null, ReadCommentHandling = JsonCommentHandling.Skip, TypeInfoResolver = new DefaultJsonTypeInfoResolver { Modifiers = { ApplyCustomModifiers } },