Skip to main content

parse_json_fragment

Function parse_json_fragment 

Source
pub fn parse_json_fragment(s: &str) -> JsonResult
Expand description

Parse a JSON string that may be incomplete (e.g. streaming tool arguments).

Returns JsonResult::Incomplete when the payload is cut off mid-token, allowing the caller to buffer and retry.