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 852ba0f commit b2d6481Copy full SHA for b2d6481
src/ModelContextProtocol.Core/McpJsonUtilities.cs
@@ -40,8 +40,10 @@ private static JsonSerializerOptions CreateDefaultOptions()
40
// Copy the configuration from the source generated context.
41
JsonSerializerOptions options = new(JsonContext.Default.Options);
42
43
- // Chain with all supported types and converters from MEAI
+ // Chain with all supported types from MEAI.
44
options.TypeInfoResolverChain.Add(AIJsonUtilities.DefaultOptions.TypeInfoResolver!);
45
+
46
+ // Add a converter for user-defined enums, if reflection is enabled by default.
47
if (JsonSerializer.IsReflectionEnabledByDefault)
48
{
49
options.Converters.Add(new UserDefinedJsonStringEnumConverter());
0 commit comments