From bf563c49c2f2ab20f6c2d5a56ae9915e87f2d2c6 Mon Sep 17 00:00:00 2001 From: James May Date: Tue, 12 Nov 2024 14:10:52 +1100 Subject: [PATCH] host.json: Ignore comments and trailing commas see https://github.com/Azure/azure-functions-host/issues/9583 --- .../src/AspNetMiddleware/FunctionsEndpointDataSource.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/extensions/Worker.Extensions.Http.AspNetCore/src/AspNetMiddleware/FunctionsEndpointDataSource.cs b/extensions/Worker.Extensions.Http.AspNetCore/src/AspNetMiddleware/FunctionsEndpointDataSource.cs index 4590f6336..51285d1f2 100644 --- a/extensions/Worker.Extensions.Http.AspNetCore/src/AspNetMiddleware/FunctionsEndpointDataSource.cs +++ b/extensions/Worker.Extensions.Http.AspNetCore/src/AspNetMiddleware/FunctionsEndpointDataSource.cs @@ -22,7 +22,9 @@ internal class FunctionsEndpointDataSource : EndpointDataSource private static readonly JsonSerializerOptions _jsonSerializerOptions = new() { - PropertyNameCaseInsensitive = true + AllowTrailingCommas = true, + PropertyNameCaseInsensitive = true, + ReadCommentHandling = JsonCommentHandling.Skip, };