Skip to main content

serialize_response

Function serialize_response 

Source
pub fn serialize_response(resp: &HookResponse, caller: &CallerKind) -> Value
Expand description

Serialize a HookResponse into the JSON format expected by the detected caller.

Does not use event-type context. For PreToolUse blocking on Claude Code, prefer [serialize_response_with_event] so the correct hookSpecificOutput format is used.