PHPackages                             mlambley/json-reference - 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. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. mlambley/json-reference

ActiveLibrary[Parsing &amp; Serialization](/categories/parsing)

mlambley/json-reference
=======================

A library for working with JSON References

1.1.0(8y ago)057.2k↓54%MITPHPPHP &gt;=5.6.0

Since Apr 24Pushed 7y ago1 watchersCompare

[ Source](https://github.com/mlambley/json-reference)[ Packagist](https://packagist.org/packages/mlambley/json-reference)[ RSS](/packages/mlambley-json-reference/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependencies (11)Versions (5)Used By (0)

JSON Reference
==============

[](#json-reference)

Maintained Once Again!
======================

[](#maintained-once-again)

This project was originally forked from thephpleague who is no longer maintaining it. However this library is the best json dereferencer I can find, so I will continue to maintain it.

Please log any issues or feature requests [here](https://github.com/mlambley/json-reference/issues)

---

Most JSON schemas use JSON references to minimize duplication. A JSON reference is an object that looks like {"$ref": "[http://some/where"}](http://some/where%22%7D) and points to a JSON object somewhere else.

JSON Reference is a library for resolving references.

- Resolves all references, replacing them with proxy objects.
- Supports references to external files, urls, or custom sources.
- Safely resolves circular references.
- Supports caching dereferenced schemas.
- Dereferenced schemas can be safely json\_encoded.
- Works with Swagger, JSON Schema, and any other spec compliant JSON documents.

Install
-------

[](#install)

### Via Composer

[](#via-composer)

```
composer require mlambley/json-reference
```

Usage
-----

[](#usage)

Complete documentation is available [here](http://json-reference.thephpleague.com/)

Change log
----------

[](#change-log)

Please see [CHANGELOG](CHANGELOG.md) for more information about what has changed recently.

Testing
-------

[](#testing)

```
$ composer test-server
$ composer test
```

Benchmarks
----------

[](#benchmarks)

The benchmarks require a local redis server to be running on localhost at the default port.

```
$ composer bench
```

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Credits
-------

[](#credits)

- \[Matt Allan\]\[link-author\]
- \[All Contributors\]\[link-contributors\]

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

34

—

LowBetter than 75% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity29

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 50% 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 ~167 days

Total

3

Last Release

3022d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/17264636?v=4)[Mark Lambley](/maintainers/mlambley)[@mlambley](https://github.com/mlambley)

---

Top Contributors

[![peterpostmann](https://avatars.githubusercontent.com/u/9541377?v=4)](https://github.com/peterpostmann "peterpostmann (3 commits)")[![mark-lambley-simpro](https://avatars.githubusercontent.com/u/24515999?v=4)](https://github.com/mark-lambley-simpro "mark-lambley-simpro (2 commits)")[![natebrunette](https://avatars.githubusercontent.com/u/1831497?v=4)](https://github.com/natebrunette "natebrunette (1 commits)")

---

Tags

jsonReferencejson-reference

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/mlambley-json-reference/health.svg)

```
[![Health](https://phpackages.com/badges/mlambley-json-reference/health.svg)](https://phpackages.com/packages/mlambley-json-reference)
```

###  Alternatives

[justinrainbow/json-schema

A library to validate a json schema.

3.6k334.7M789](/packages/justinrainbow-json-schema)[mtdowling/jmespath.php

Declaratively specify how to extract elements from a JSON document

2.0k504.8M167](/packages/mtdowling-jmespathphp)[jms/serializer

Library for (de-)serializing data of any complexity; supports XML, and JSON.

2.3k141.9M929](/packages/jms-serializer)[jms/serializer-bundle

Allows you to easily serialize, and deserialize data of any complexity

1.8k92.4M679](/packages/jms-serializer-bundle)[moonshine/moonshine

Laravel administration panel

1.3k253.1k81](/packages/moonshine-moonshine)[colinodell/json5

UTF-8 compatible JSON5 parser for PHP

30525.1M56](/packages/colinodell-json5)

PHPackages © 2026

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