Skip to content

Commit

Permalink
Revert JSON serialization to how it was with Newtonsoft (#3302)
Browse files Browse the repository at this point in the history
  • Loading branch information
Abrynos authored Oct 5, 2024
1 parent 731fbca commit de9900a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ArchiSteamFarm/Helpers/Json/JsonUtilities.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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 } },
Expand Down

0 comments on commit de9900a

Please sign in to comment.