pub fn parse_message(data: Value) -> Result<Message>Expand description
Parse a JSON value into a typed Message
§Arguments
data- Raw JSON value from CLI output
§Returns
Parsed Message object or error
§Errors
Returns ClaudeError::MessageParse if the JSON cannot be parsed into a valid Message
§Security Note
For additional security against deeply nested JSON attacks, consider using
serde_json::Deserializer::with_recursion_limit() to set explicit depth limits.
This is not currently implemented to avoid additional complexity, but the current
timeout mechanism on read operations provides some protection against excessive
parsing time.