fix(rmcp-macros): use re-exported serde_json path in task_handler (#735)
* fix(rmcp-macros): use re-exported serde_json path in task_handler Replace bare `::serde_json::` with `::rmcp::serde_json::` in task_handler.rs to prevent compilation errors in crates that don't directly depend on serde_json. Fixes #487 * Update crates/rmcp-macros/src/task_handler.rs --------- Co-authored-by: Dale Seo <5466341+DaleSeo@users.noreply.github.com>
This commit is contained in:
parent
fc757d41ca
commit
be248980f2
1 changed files with 1 additions and 1 deletions
|
|
@ -193,7 +193,7 @@ pub fn task_handler(attr: TokenStream, input: TokenStream) -> syn::Result<TokenS
|
|||
if let Some(tool) = boxed.as_any().downcast_ref::<rmcp::task_manager::ToolCallTaskResult>() {
|
||||
match &tool.result {
|
||||
Ok(call_tool) => {
|
||||
let value = ::serde_json::to_value(call_tool).unwrap_or(::serde_json::Value::Null);
|
||||
let value = ::rmcp::serde_json::to_value(call_tool).unwrap_or_default();
|
||||
return Ok(rmcp::model::GetTaskPayloadResult::new(value));
|
||||
}
|
||||
Err(err) => return Err(McpError::internal_error(
|
||||
|
|
|
|||
Loading…
Reference in a new issue