We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bef80b6 commit 732d20dCopy full SHA for 732d20d
src/ModelContextProtocol.Core/McpJsonUtilities.cs
@@ -41,8 +41,10 @@ private static JsonSerializerOptions CreateDefaultOptions()
41
// Copy the configuration from the source generated context.
42
JsonSerializerOptions options = new(JsonContext.Default.Options);
43
44
- // Chain with all supported types and converters from MEAI
+ // Chain with all supported types from MEAI.
45
options.TypeInfoResolverChain.Add(AIJsonUtilities.DefaultOptions.TypeInfoResolver!);
46
+
47
+ // Add a converter for user-defined enums, if reflection is enabled by default.
48
if (JsonSerializer.IsReflectionEnabledByDefault)
49
{
50
options.Converters.Add(new UserDefinedJsonStringEnumConverter());
0 commit comments