JSON File Format
The schedule data in JSON format has a single JSON record per line. The file can be parsed line-by-line to extract the data required. Each schedule file contains:
- A header row
- Zero or more TIPLOC records
- Zero or more association records
- Zero or more schedule records
- and an end-of-file (EOF) record.
Each association and schedule record has an action - either 'create' or 'delete'. These are used in update files to add or remove records from the master schedule. Deletions will not be raised for schedules that have become historic. In full files, there will be no 'delete' records. Update files must be applied sequentially to a full file.
Record Types
Schedule data contains three types of records:
- Tiploc records - containing details of timing point locations in the schedules
- Association records - defining associations between services
- Schedule records - containing details of the schedules themselves
Network Rail Open Data Feeds | |
---|---|
Data Feeds | About the Feeds • Account States • Durable Subscriptions • Example Code ( PHP / C# / Java / Ruby / Node.js) • Advanced Uses • FAQ • Release Notes |
RTPPM | RTPPM Feed |
Train Movements | Train Movements Feed • Train Activation • Train Cancellation • Train Movement • Train Reinstatement • Change of Origin • Change of Identity • Change of Location • TSPEED Field • Planned Cancellations • Cancellation Codes |
TD | TD Feed • C-Class Messages • S-Class Messages • Train Describers • TD Berths |
VSTP | VSTP Feed |
TSR | TSR Feed • Route Codes |
SCHEDULE | SCHEDULE Feed • TIPLOC Records • Schedule and Location Records • Association Records • CIF Codes • How Scheduling Works • Allowances |
Reference Data | Reference Data Feed • TOC Codes • CIF Codes • Delay Attribution Codes • Identifying Locations (STANOX, TIPLOC, NLC and 3-Alpha Codes) • STANOX Geographical Areas • Train Planning data (BPLAN) |