jsonlines

Stream JSON Lines from server endpoints to clients with generator handlers.

52|Updated Jul 12, 2023
One-click install
npx skills add https://github.com/finom/vovk --skill jsonlines
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: jsonlines
Source: https://github.com/finom/vovk/tree/main/packages/claude-plugin/skills/jsonlines
Command: npx skills add https://github.com/finom/vovk --skill jsonlines

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Incremental data delivery by streaming JSON Lines from server handlers to clients, allowing real-time processing as data arrives.

Core Features & Use Cases

  • Generator handlers (function* / async function*) yielding one JSON object per line to the client.
  • JSONLinesResponder for manual control of streaming lifecycle (send, close, throw) when generator patterns aren’t sufficient.
  • Client-side consumption patterns including for await loops, progressive responses, and stream utilities like asPromise and abortController.
  • Real-world scenarios include chat streaming, long-running jobs progress, and multi-source data aggregation.

Quick Start

Start a stream by invoking the streaming endpoint and consume items with a for await loop.

Frequently Asked Questions about jsonlines

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I stream JSON Lines from a server endpoint to a client in real time?

Stream JSON Lines from a server endpoint by implementing generator handlers or using JSONLinesResponder to yield one JSON object per line, enabling incremental data delivery to the client as it arrives.

What is the best way to consume a streaming JSON Lines response on the client side?

The best way to consume streaming JSON Lines on the client side is by using for await loops to iterate over progressive responses, along with stream utilities like asPromise and abortController for control.

Can I manually control the streaming lifecycle instead of using async generators?

Yes, you can manually control the streaming lifecycle by using the JSONLinesResponder, which provides explicit send, close, and throw methods when generator patterns are not sufficient for your use case.

When do I need to use JSON Lines streaming for API responses?

You need to use JSON Lines streaming for API responses in scenarios like chat streaming, long-running tasks progress updates, and multi-source data aggregation where each line represents new incremental information.

Does streaming JSON Lines support per-iteration validation and error handling?

Yes, streaming JSON Lines supports per-iteration validation and error handling within the generator handlers, ensuring each yielded JSON object is processed safely during the async iteration.