csharp-sdk/src/mcpdotnet/Shared
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Stephen Toub 9f0beec63a
Avoid new JsonSerializerOptions instances (#34)
We try hard to avoid creating unnecessary JsonSerializerOptions, as each can have a non-trivial overhead due to how reflection is used by JsonSerializer and the JSO instance serving as a cache.  Rather than creating a new JSO for each transport / endpoint, this can just use a singleton. The only thing it loses is logging when the converter fails, but all of those paths are also throwing an exception, which can be logged higher in the call stack.
2025-03-07 19:50:27 +01:00
..
McpJsonRpcEndpoint.cs Avoid new JsonSerializerOptions instances (#34) 2025-03-07 19:50:27 +01:00