Expand description
Typed JSON extraction from LLM responses.
Provides parse_json for extracting typed structs and parse_json_value
for untyped JSON extraction, using a multi-strategy pipeline that handles
think blocks, markdown fences, bracket matching, and JSON repair.
The _with_trace variants return a ParseTrace alongside the result
for observability and debugging.
Functions§
- parse_
json - Parse an LLM response into a typed struct.
- parse_
json_ value - Parse into a
serde_json::Valuewhen you don’t know the schema. - parse_
json_ value_ with_ trace - Parse into a
serde_json::Valuewith diagnostic trace. - parse_
json_ with_ trace - Parse an LLM response into a typed struct, returning a diagnostic trace.