PHPackages                             trainjunkies-packages/schedule-json-parser - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. trainjunkies-packages/schedule-json-parser

ActiveLibrary

trainjunkies-packages/schedule-json-parser
==========================================

Parse Network Rail Schedule JSON file

v3.0(5y ago)03MITPHPPHP ^7.2

Since Feb 21Pushed 5y agoCompare

[ Source](https://github.com/third-rail-packages/schedule-json-parser)[ Packagist](https://packagist.org/packages/trainjunkies-packages/schedule-json-parser)[ RSS](/packages/trainjunkies-packages-schedule-json-parser/feed)WikiDiscussions master Synced 4w ago

READMEChangelog (4)Dependencies (7)Versions (5)Used By (0)

Trainjunkies - Schedule JSON Parser
===================================

[](#trainjunkies---schedule-json-parser)

[![CI](https://github.com/trainjunkies-packages/schedule-json-parser/workflows/CI/badge.svg)](https://github.com/trainjunkies-packages/schedule-json-parser/workflows/CI/badge.svg)[![Latest Stable Version](https://camo.githubusercontent.com/c21ad76fa3c6e8aed71d307ef8b2da72afd53ce6b660196b20846d6c803feb76/68747470733a2f2f706f7365722e707567782e6f72672f747261696e6a756e6b6965732d7061636b616765732f7363686564756c652d6a736f6e2d7061727365722f76)](https://packagist.org/packages/trainjunkies-packages/schedule-json-parser)[![License](https://camo.githubusercontent.com/ea8059677afae3afedc5889d16987b74ccf5c1ddd3cbcbd7b4e779a5c1fc4182/68747470733a2f2f706f7365722e707567782e6f72672f747261696e6a756e6b6965732d7061636b616765732f7363686564756c652d6a736f6e2d7061727365722f6c6963656e7365)](https://packagist.org/packages/trainjunkies-packages/schedule-json-parser)

PHP package to parse Network Rail Schedule JSON file.

Installation
------------

[](#installation)

### via Composer

[](#via-composer)

Install [Composer](https://getcomposer.org/doc/00-intro.md) and require the package with the below command.

```
composer.phar require trainjunkies-packages/schedule-json-parser
```

Getting Started
---------------

[](#getting-started)

### Network Rail Objects

[](#network-rail-objects)

JSON Records can be converted into associative arrays by using the `TrainjunkiesPackages\ScheduleJsonParser\Factory` class.

```
$handler = TrainjunkiesPackages\ScheduleJsonParser\Factory::create($jsonFilePath);

$meta = function($data) {
    var_dump($data);
};

$tiploc = function($data) {
    var_dump($data);
};

$association = function($data) {
    var_dump($data);
};

$schedule = function($data) {
    var_dump($data);
};

try {
    $handler->parse(
        $callback,
        $callback,
        $callback,
        $callback
    );
} catch (\Exception $e) {
    echo $e->getMessage() . PHP_EOL;
    exit(1);
}
```

Example scripts can be found in the `./scripts` directory.

Further information on the fields and their values can be found in the [Open Rail Data Wiki](https://wiki.openraildata.com/index.php?title=JSON_File_Format)

Development
-----------

[](#development)

See [CONTRIBUTING.md](https://github.com/trainjunkies-packages/schedule-json-parser/blob/master/CONTRIBUTING.md) for development practices.

Authors
-------

[](#authors)

- **Ben McManus** - [bennoislost](https://github.com/bennoislost)

See also the list of [contributors](https://github.com/trainjunkies-packages/schedule-json-parser/contributors) who participated in this project

License
-------

[](#license)

This project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details

Acknowledgments
---------------

[](#acknowledgments)

-
-

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~154 days

Total

4

Last Release

2171d ago

Major Versions

v1.1 → v3.02020-05-29

### Community

Maintainers

![](https://www.gravatar.com/avatar/8047af179450f635c711dac4045c51052d07104e7dc0b2a189613ef036814e04?d=identicon)[the-third-rail](/maintainers/the-third-rail)

---

Top Contributors

[![bennoislost](https://avatars.githubusercontent.com/u/1015154?v=4)](https://github.com/bennoislost "bennoislost (3 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan, Psalm

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/trainjunkies-packages-schedule-json-parser/health.svg)

```
[![Health](https://phpackages.com/badges/trainjunkies-packages-schedule-json-parser/health.svg)](https://phpackages.com/packages/trainjunkies-packages-schedule-json-parser)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
