Skip to content

Commit be24898

Browse files
kakarot-devDaleSeo
andauthored
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>
1 parent fc757d4 commit be24898

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

crates/rmcp-macros/src/task_handler.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ pub fn task_handler(attr: TokenStream, input: TokenStream) -> syn::Result<TokenS
193193
if let Some(tool) = boxed.as_any().downcast_ref::<rmcp::task_manager::ToolCallTaskResult>() {
194194
match &tool.result {
195195
Ok(call_tool) => {
196-
let value = ::serde_json::to_value(call_tool).unwrap_or(::serde_json::Value::Null);
196+
let value = ::rmcp::serde_json::to_value(call_tool).unwrap_or_default();
197197
return Ok(rmcp::model::GetTaskPayloadResult::new(value));
198198
}
199199
Err(err) => return Err(McpError::internal_error(

0 commit comments

Comments
 (0)