PHPackages                             averias/phpredis-json - 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. [Caching](/categories/caching)
4. /
5. averias/phpredis-json

ActiveLibrary[Caching](/categories/caching)

averias/phpredis-json
=====================

A PHP client for RedisJSON module using phpredis extension

1.4.0(5y ago)3429.3k9[5 issues](https://github.com/averias/phpredis-json/issues)MITPHPPHP ^7.2CI failing

Since Nov 7Pushed 5y ago5 watchersCompare

[ Source](https://github.com/averias/phpredis-json)[ Packagist](https://packagist.org/packages/averias/phpredis-json)[ Docs](https://github.com/averias/phpredis-json)[ RSS](/packages/averias-phpredis-json/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependencies (3)Versions (20)Used By (0)

[![Test Coverage](https://camo.githubusercontent.com/0f7012c2615e28c4dd636a7f23c191c04e5fd48c92d69473469184c8ea15e3a5/68747470733a2f2f6170692e636f6465636c696d6174652e636f6d2f76312f6261646765732f30313339613236373633656534613063333334332f746573745f636f766572616765)](https://codeclimate.com/github/averias/phpredis-json/test_coverage)[![Maintainability](https://camo.githubusercontent.com/82d6a2a2ba51a44e09cd499a027d0d37b735da342293a084602553bd5a8f9260/68747470733a2f2f6170692e636f6465636c696d6174652e636f6d2f76312f6261646765732f30313339613236373633656534613063333334332f6d61696e7461696e6162696c697479)](https://codeclimate.com/github/averias/phpredis-json/maintainability)[![Build Status](https://camo.githubusercontent.com/b83fb70f8f90b2f351be52577aac2363d457f031de9c5e16e44912906a8171d5/68747470733a2f2f7472617669732d63692e6f72672f617665726961732f70687072656469732d6a736f6e2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/averias/phpredis-json)[![Packagist Version](https://camo.githubusercontent.com/6ac9408c02f83bdff03d7b094638b74f02d1916f47330b45b5e9cbac377a253d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f617665726961732f70687072656469732d6a736f6e2e737667)](https://packagist.org/packages/averias/phpredis-json)[![GitHub](https://camo.githubusercontent.com/d7c501118059794ff89efef9ff1cf17f7f0b2c9b0a5cc2ba1a741312f2f19cef/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f617665726961732f70687072656469732d6a736f6e2e737667)](https://github.com/averias/phpredis-json)

Phpredis-JSON
=============

[](#phpredis-json)

RedisJson with the PHP Redis extension [phpredis](https://github.com/phpredis/phpredis).

Intro
-----

[](#intro)

Phpredis-JSON provides a full set of commands for [RedisJson Module](https://oss.redislabs.com/redisjson/). It's built on top of the `phpredis` and use it as Redis client, so you can also take advantage of some of the features included in `phpredis` as Redis client.

Why?
----

[](#why)

Although you can issue RedisJSON commands by using some PHP Redis clients which provides you the ability to send raw Redis commands, Phpredis-JSON:

- avoids you the task of encoding your PHP data structures to JSON before sending them to Redis and decode the JSON responses back from Redis
- it validates JSON encode/decode and throw a proper exception in case of failure
- provides a set of commands as methods of the RedisJSON client

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

[](#requirements)

- Redis server 4.0+ version (RedisJson Module is only available from Redis 4.0+)
- RedisJson Module installed on Redis server as specified in [Building and loading RedisJSON Module](https://oss.redislabs.com/redisjson/#building-and-loading-the-module)
- PHP 7.2+ with PHP Redis extension 5 installed

Usage
-----

[](#usage)

```
