From c8f1c974c1acbe1f5bb5051602dd66d7a6003ed9 Mon Sep 17 00:00:00 2001 From: Doug Slater Date: Tue, 17 Jun 2025 22:11:07 -0400 Subject: [PATCH] Feature: Allow comments in json config --- BrowseRouter/Infrastructure/SourceGenerationContext.cs | 7 +++++-- Directory.Build.props | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/BrowseRouter/Infrastructure/SourceGenerationContext.cs b/BrowseRouter/Infrastructure/SourceGenerationContext.cs index ef22b8c..903e4bb 100644 --- a/BrowseRouter/Infrastructure/SourceGenerationContext.cs +++ b/BrowseRouter/Infrastructure/SourceGenerationContext.cs @@ -1,11 +1,14 @@ -using System.Text.Json.Serialization; +using System.Text.Json; +using System.Text.Json.Serialization; using BrowseRouter.Config; namespace BrowseRouter; [JsonSourceGenerationOptions( WriteIndented = true, - PropertyNameCaseInsensitive = true + PropertyNameCaseInsensitive = true, + AllowTrailingCommas = true, + ReadCommentHandling = JsonCommentHandling.Skip )] [JsonSerializable(typeof(FilterPreference))] [JsonSerializable(typeof(List), TypeInfoPropertyName = "FilterPreferenceList")] diff --git a/Directory.Build.props b/Directory.Build.props index 4ebdcb2..e4e24c4 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -5,7 +5,7 @@ enable enable latest - 0.15.3 + 0.15.4 BrowseRouter EnduraByte LLC 2025