Skip to content

Commit e12042b

Browse files
committed
✍️ Json serialization: ignore read-only properties
This change was made to ignore properties inherited from `ReactiveObject`, which has annotations that opt out of serialization for public properties. But System.Text.Json doesn't support these annotations (ref dotnet/runtime#29975).
1 parent 3837bd0 commit e12042b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

YoutubeDl.Wpf/Utils/FileHelper.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ public static class FileHelper
1212
public static readonly JsonSerializerOptions commonJsonSerializerOptions = new()
1313
{
1414
Encoder = JavaScriptEncoder.UnsafeRelaxedJsonEscaping,
15+
IgnoreReadOnlyProperties = true,
1516
WriteIndented = true,
1617
};
1718

0 commit comments

Comments
 (0)