PHPackages                             johnstevenson/json-works - 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. [Validation &amp; Sanitization](/categories/validation)
4. /
5. johnstevenson/json-works

ActiveLibrary[Validation &amp; Sanitization](/categories/validation)

johnstevenson/json-works
========================

Create, edit, query and validate json

2.1.0(3y ago)272.5M—0.7%35MITPHPPHP ^7.4 || ^8.0

Since Apr 23Pushed 3y ago3 watchersCompare

[ Source](https://github.com/johnstevenson/json-works)[ Packagist](https://packagist.org/packages/johnstevenson/json-works)[ Docs](http://github.com/johnstevenson/json-works)[ RSS](/packages/johnstevenson-json-works/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)Dependencies (4)Versions (8)Used By (5)

Json-Works
==========

[](#json-works)

[![packagist](https://camo.githubusercontent.com/1d120d3a86f235d79ac45a0a6867b9e6b82f0bd992a7542986f8b900a00f3eb8/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6a6f686e73746576656e736f6e2f6a736f6e2d776f726b73)](https://packagist.org/packages/johnstevenson/json-works)[![Continuous Integration](https://github.com/johnstevenson/json-works/actions/workflows/continuous-integration.yml/badge.svg?branch=main)](https://github.com/johnstevenson/json-works/actions?query=branch:main)[![license](https://camo.githubusercontent.com/cab09bd83d0a35d2f76c741576c14959e23be4e2943e7e273e21b226761b2bd1/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6a6f686e73746576656e736f6e2f6a736f6e2d776f726b732e737667)](https://camo.githubusercontent.com/cab09bd83d0a35d2f76c741576c14959e23be4e2943e7e273e21b226761b2bd1/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6a6f686e73746576656e736f6e2f6a736f6e2d776f726b732e737667)[![php](https://camo.githubusercontent.com/ca5cc3b28a8cb9f3dc0fe9be2bcb8faa895c14474917cf256ccf3fb6bbd007fe/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f6a6f686e73746576656e736f6e2f6a736f6e2d776f726b733f636f6c6f72423d383839324246)](https://camo.githubusercontent.com/ca5cc3b28a8cb9f3dc0fe9be2bcb8faa895c14474917cf256ccf3fb6bbd007fe/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f6a6f686e73746576656e736f6e2f6a736f6e2d776f726b733f636f6c6f72423d383839324246)

A PHP library to create, edit, query and validate [JSON](https://www.rfc-editor.org/rfc/rfc8259).

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

[](#installation)

Install the latest version with:

```
$ composer require johnstevenson/json-works
```

Requirements
------------

[](#requirements)

- PHP 7.4 minimum, although using the latest PHP version is highly recommended.

Usage
-----

[](#usage)

The library is intended to be used with complex json structures, or with json data that needs validation. Full usage information is available in the [documentation](docs/doc.md).

- [Overview](#overview)
- [Validation](#validation)

### Overview

[](#overview)

Json-Works allows you to create, edit and query json data using [JSON Pointer](https://www.rfc-editor.org/rfc/rfc6901) syntax. For example:

```
