PHPackages                             sgpinkus/jsonref - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. sgpinkus/jsonref

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

sgpinkus/jsonref
================

A PHP JSON Reference dereferencer

v0.4.0(5y ago)111GPL-3.0PHPPHP &gt;=5.3CI failing

Since Apr 11Pushed 5y ago1 watchersCompare

[ Source](https://github.com/sgpinkus/JsonRef)[ Packagist](https://packagist.org/packages/sgpinkus/jsonref)[ RSS](/packages/sgpinkus-jsonref/feed)WikiDiscussions master Synced 6d ago

READMEChangelogDependencies (2)Versions (6)Used By (1)

PHP JSONREF
===========

[](#php-jsonref)

This library implements [JSON Reference v0.4.0](http://jsonref.org) and by extension [JSON Pointer](https://tools.ietf.org/html/draft-ietf-appsawg-json-pointer-04) (JSON Reference requires JSON Pointer) for PHP. JSON Reference v0.4.0 succeeds [JSON Reference v0.3.0](https://tools.ietf.org/html/draft-pbryan-zyp-json-ref-03) and is *not* entirely backwards compatible.

This library replaces JSON references in a JSON document with native PHP references to parts of the same decoded JSON document, or parts of some other decoded JSON document referred to by URI. It supports doing this on an existing decoded JSON document data structures, or loading and decoding the JSON document from a URL.

*NOTE: Pre-encode, normalization of objects is not yet supported.*

INSTALLATION
============

[](#installation)

```
composer install

```

TESTS
=====

[](#tests)

```
composer test

```

SYNOPSIS
========

[](#synopsis)

The following show various ways of loading and dereferencing a JSON document:

```
