Use JsonElement.Parse for string-to-JsonElement deserialization (#1002)
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: stephentoub <2642209+stephentoub@users.noreply.github.com>
This commit is contained in:
parent
9395394c1b
commit
a559bfb891
1 changed files with 48 additions and 48 deletions
|
|
@ -43,13 +43,13 @@ public partial class McpServerBuilderExtensionsToolsTests : ClientServerTestBase
|
|||
{
|
||||
Name = "FirstCustomTool",
|
||||
Description = "First tool returned by custom handler",
|
||||
InputSchema = JsonSerializer.Deserialize<JsonElement>("""
|
||||
InputSchema = JsonElement.Parse("""
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {},
|
||||
"required": []
|
||||
}
|
||||
""", McpJsonUtilities.DefaultOptions),
|
||||
"""),
|
||||
}],
|
||||
};
|
||||
|
||||
|
|
@ -61,13 +61,13 @@ public partial class McpServerBuilderExtensionsToolsTests : ClientServerTestBase
|
|||
{
|
||||
Name = "SecondCustomTool",
|
||||
Description = "Second tool returned by custom handler",
|
||||
InputSchema = JsonSerializer.Deserialize<JsonElement>("""
|
||||
InputSchema = JsonElement.Parse("""
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {},
|
||||
"required": []
|
||||
}
|
||||
""", McpJsonUtilities.DefaultOptions),
|
||||
"""),
|
||||
}],
|
||||
};
|
||||
|
||||
|
|
@ -79,13 +79,13 @@ public partial class McpServerBuilderExtensionsToolsTests : ClientServerTestBase
|
|||
{
|
||||
Name = "FinalCustomTool",
|
||||
Description = "Third tool returned by custom handler",
|
||||
InputSchema = JsonSerializer.Deserialize<JsonElement>("""
|
||||
InputSchema = JsonElement.Parse("""
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {},
|
||||
"required": []
|
||||
}
|
||||
""", McpJsonUtilities.DefaultOptions),
|
||||
"""),
|
||||
}],
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue