ProjectData#

The full project snapshot: scheduling config, calendars, tasks, links, resources and assignments. It's the data_json argument of schedule, JsonProject.solve and JsonProject.analyze, sent as JSON text. ProjectData is an import format: no call returns it.

Note

tasks is required in ProjectData; send "tasks": [] for an empty project.

Fields#

Field Type Required Default Description
config SchedulingConfig | null no all defaults Project-wide scheduling settings. null gives the default config.
calendars CalendarData[] no [] Working calendars. Without a "global" entry, the built-in global calendar applies: Monday to Friday, 08:00-12:00 and 13:00-17:00.
tasks TaskData[] yes - Tasks, summaries and milestones.
links LinkData[] no [] Dependencies between tasks.
resources ResourceData[] no [] Resources that assignments book.
assignments AssignmentData[] no [] Resource bookings on tasks.

The payload must be a JSON object. The five lists can be omitted, but not set to null: "links": null fails with parse. Unknown top-level fields are ignored. Field spelling and null handling are described in Wire format.

Validation#

The snapshot is decoded first, then checked as a whole. Decoding errors return kind: "parse" with path: null:

  • the payload isn't a JSON object
  • tasks is missing or null
  • a list field is null or not an array

After decoding, every record is checked against its own rules (listed on each record's page), and the snapshot is checked across records. A failed check returns kind: "validation" with path pointing at the offending record or field:

Check Example path
Duplicate id within tasks, links, resources, assignments or calendars. Ids compare like JavaScript object keys, so 1 and "1" collide. tasks[1].id, calendars[1]
A task parent that names no task in the snapshot. tasks[0].parent
A cycle in the task hierarchy. tasks[0].parent
A task calendar_id, or a resource calendar_id in "resource" calendar mode, that names no calendar. tasks[0].calendar_id
An assignment task or resource that names no record in the snapshot. assignments[0].resource

A link whose source or target names no task isn't an error. The link is dropped and reported as a dropped-link note in the result.

These are the strict-mode rules. schedule always validates strictly; a JsonProject created with {"validation": "repair"} fixes some of these inputs instead and reports each fix as a repaired note. Repair fills missing task dates from config.project_start or from other dated tasks, so an entirely undated project is still rejected.

Used by#

Example#

{
  "config": { "duration_unit": "day", "apply_constraints": true },
  "calendars": [
    { "id": "global", "worktime": { "hours": ["9:00-13:00", "14:00-18:00"] } }
  ],
  "tasks": [
    { "id": "phase", "type": "summary" },
    { "id": "design", "parent": "phase", "start_date": "2026-08-10", "duration": 3 },
    { "id": "build", "parent": "phase", "start_date": "2026-08-10", "duration": 5 },
    { "id": "release", "type": "milestone", "start_date": "2026-08-21" }
  ],
  "links": [
    { "id": "l1", "source": "design", "target": "build", "type": "fs" },
    { "id": "l2", "source": "build", "target": "release", "type": "fs" }
  ],
  "resources": [{ "id": "dev", "capacity": 1 }],
  "assignments": [
    { "task": "design", "resource": "dev", "value": 1 },
    { "task": "build", "resource": "dev", "value": 1 }
  ]
}