Expand description
JSON extraction from raw LLM text output. Extract structured JSON from raw LLM text output.
LLMs often wrap JSON in markdown code fences or add prose around it. This module handles the common cases:
```json ... ```fenced blocks``` ... ```fences with JSON inside- Raw balanced-bracket JSON buried in text
Structs§
- Json
Extractor - Type-safe JSON extraction wrapper for use with LLM clients.
Enums§
- Parse
Json Error - Error from
parse_json.
Functions§
- extract_
json - Extract the first JSON object or array from raw LLM text.
- extract_
xml_ tag - Extract the content of a named XML tag from raw LLM text.
- parse_
json - Parse LLM output into a typed struct using
extract_json+serde_json.