A library for working with JSON References

1.1.0 2018-03-25 16:13 UTC

This package is auto-updated.

Last update: 2021-10-17 08:02:29 UTC


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

Most JSON schemas use JSON references to minimize duplication. A JSON reference is an object that looks like {"$ref": "http://some/where"} 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.


Via Composer

composer require mlambley/json-reference


Complete documentation is available here

Change log

Please see CHANGELOG for more information about what has changed recently.


$ composer test-server
$ composer test


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

$ composer bench


Please see CONTRIBUTING for details.


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


The MIT License (MIT). Please see License File for more information.