JSON (JavaScript Object Notation) is a structured data format for exchanging values through APIs. It gives requests and responses a predictable representation built from objects, arrays, names, and values. section 5.2 section 8.3
An API applies JSON at both boundaries: clients encode request bodies as JSON, and servers encode response bodies as JSON. Keeping the manager and worker APIs in the same format avoids unnecessary translation between services. section 5.2 section 8.3
In the task API, JSON appears in these operational roles:
- A POST /tasks request carries a JSON-encoded task.TaskEvent containing the task to start. section 5.2
A task event
A task event nests task data inside an outer object: the event supplies identifiers and state, while its Task value supplies the task name, image, and state. The API extracts that nested task and adds it to the worker queue. section 5.2


































