Skip to content
ignitae
Academy
Streaming and structured output
Collect a stream of chunks, buffer partial JSON, and validate it into a typed value.
Syllabus
Read a stream
A stream arrives in chunks, collected as it flows
Collect a stream (exercise)
Buffer partial JSON
Buffering accumulates partial JSON until it is whole
Buffer partial JSON (exercise)
Validate and type
A type guard validates unknown data into a typed value
Type guard (exercise)