We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 98fb698 commit b51df8aCopy full SHA for b51df8a
1 file changed
src/ModelContextProtocol/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