Skip to content

Commit 9c500b4

Browse files
authored
Ensure CamelCase of enum serialization (#67)
1 parent 67320b2 commit 9c500b4

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/mcpdotnet/Utils/Json/JsonSerializerOptionsExtensions.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
using Microsoft.Extensions.Logging;
2-
using System.Text.Json;
1+
using System.Text.Json;
32
using System.Text.Json.Serialization;
43

54
namespace McpDotNet.Utils.Json;
@@ -21,7 +20,7 @@ private static JsonSerializerOptions CreateDefaultOptions()
2120

2221
// Add custom converters
2322
options.Converters.Add(new JsonRpcMessageConverter());
24-
options.Converters.Add(new JsonStringEnumConverter());
23+
options.Converters.Add(new JsonStringEnumConverter(JsonNamingPolicy.CamelCase));
2524

2625
// Configure general options
2726
options.PropertyNameCaseInsensitive = true;

0 commit comments

Comments
 (0)