Class McpJsonUtilities
- Namespace
- ModelContextProtocol.Utils.Json
- Assembly
- ModelContextProtocol.dll
Provides a collection of utility methods for working with JSON data in the context of MCP.
public static class McpJsonUtilities
- Inheritance
-
McpJsonUtilities
- Inherited Members
Properties
DefaultOptions
Gets the JsonSerializerOptions singleton used as the default in JSON serialization operations.
public static JsonSerializerOptions DefaultOptions { get; }
Property Value
Remarks
For Native AOT or applications disabling IsReflectionEnabledByDefault, this instance includes source generated contracts for all common exchange types contained in the ModelContextProtocol library.
It additionally turns on the following settings:
- Enables string-based enum serialization as implemented by JsonStringEnumConverter.
- Enables WhenWritingNull as the default ignore condition for properties.
- Enables AllowReadingFromString as the default number handling for number types.