Prompt Buddy logoPrompt Buddy

cloudflare · Cloudflare Workers Docs

Workers Stream large JSON

Implementation patterns for parsing and transforming large JSON request and response bodies using the Web Streams API and the @streamparser/json-whatwg library to avoid memory limit exhaustion.

Import to Prompt Buddy

Derived skill

Files assembled from official documentation

Viewing SKILL.md

Workers Stream large JSON

Implementation patterns for parsing and transforming large JSON request and response bodies using the Web Streams API and the @streamparser/json-whatwg library to avoid memory limit exhaustion.

When To Use

Use when you need to process JSON payloads that exceed the Worker memory limit or when you want to reduce latency by processing data incrementally rather than buffering the entire payload.

Reference Files

FileContainsUse For
SKILL.mdEntry point: scope, routing table, and workflow.Start here.
docs/workers-examples-streaming-json-stream-large-workflow-guide.mdA guide demonstrating how to use the Streams API to parse and transform large JSON request and response bodies within a Cloudflare Worker to avoid memory limits.Questions about a guide demonstrating how to use the Streams API to parse and transform large JSON request and response bodies within...
examples/workers-examples-streaming-json-stream-large-cloudflare-workers-streamin.textA JavaScript example demonstrating how to use @streamparser/json-whatwg to stream and parse large JSON payloads within a Cloudflare Worker.Exact payloads, commands, or snippets shown in A JavaScript example demonstrating how to use @streamparser/json-whatwg to stream and parse large JSON payloads withi...
examples/workers-examples-streaming-json-stream-large-cloudflare-workers-streamin-2.textA TypeScript example demonstrating how to use the @streamparser/json-whatwg library to stream and parse large JSON bodies within a Cloudflare Worker.Exact payloads, commands, or snippets shown in A TypeScript example demonstrating how to use the @streamparser/json-whatwg library to stream and parse large JSON bo...
examples/workers-examples-streaming-json-stream-large-cloudflare-workers-streamin-3.textA JavaScript example demonstrating how to use the JSONParser to stream and process large JSON payloads within a Cloudflare Worker.Exact payloads, commands, or snippets shown in A JavaScript example demonstrating how to use the JSONParser to stream and process large JSON payloads within a Cloud...
examples/workers-examples-streaming-json-stream-large-cloudflare-workers-streamin-4.textA Cloudflare Workers implementation using TransformStream and JSONParser to process large JSON datasets via streaming.Exact payloads, commands, or snippets shown in A Cloudflare Workers implementation using TransformStream and JSONParser to process large JSON datasets via streaming.
examples/workers-examples-streaming-json-stream-large-cloudflare-workers-streamin-5.textA Cloudflare Workers script demonstrating how to use TransformStream and JSONParser to process large JSON datasets incrementally.Exact payloads, commands, or snippets shown in A Cloudflare Workers script demonstrating how to use TransformStream and JSONParser to process large JSON datasets in...

What This Skill Covers

  • Parse and transform large JSON request and response bodies using streaming.
  • Main sections: Tags, Stream a JSON request body, Stream and transform a JSON response, Related resources.

Workflow

  1. Open the most relevant file under docs/ for the exact documented workflow and wording.
  2. Open schemas/ files for exact structured contracts.
  3. Open examples/ files for concrete requests, commands, snippets, and manifests.
  4. Do not add behavior or configuration that is not present in the attached source files.

Canonical source: https://developers.cloudflare.com/workers/examples/streaming-json