PHPackages                             kunststube/rison - 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. kunststube/rison

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

kunststube/rison
================

A PHP encoder and decoder for Rison, the compact JSON-like data format optimized for URIs.

0.92.1(11y ago)2464.5k↑10.6%2[1 issues](https://github.com/deceze/Kunststube-Rison/issues)3PHPPHP &gt;=5.3.0

Since Nov 13Pushed 11y ago2 watchersCompare

[ Source](https://github.com/deceze/Kunststube-Rison)[ Packagist](https://packagist.org/packages/kunststube/rison)[ Docs](https://github.com/deceze/Kunststube-Rison)[ RSS](/packages/kunststube-rison/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (4)Used By (3)

Kunststube\\Rison encoder and decoder for PHP
=============================================

[](#kunststuberison-encoder-and-decoder-for-php)

Rison is a compact data format optimized for URIs, a slight variation of JSON.

JSON:

```
{"a":0,"b":"foo","c":"23skidoo"}

```

URI-encoded JSON:

```
%7B%22a%22:0,%22b%22%3A%22foo%22%2C%22c%22%3A%2223skidoo%22%7D

```

Rison:

```
(a:0,b:foo,c:'23skidoo')

```

URI-encoded Rison:

```
(a:0,b:foo,c:'23skidoo')

```

See  for more information and other implementations.

Usage
-----

[](#usage)

### Procedural/convenience wrapper

[](#proceduralconvenience-wrapper)

```
require_once 'Rison/rison_functions.php';

$data = array('foo', 'bar' => array('baz'));

// encoding
$rison = Kunststube\Rison\rison_encode($data);
var_dump($rison);

// decoding
$data = Kunststube\Rison\rison_decode($rison);
var_dump($data);
```

### Object oriented

[](#object-oriented)

```
require_once 'Rison/RisonEncoder.php';
require_once 'Rison/RisonDecoder.php';

use Kunststube\Rison;

$data = array('foo', 'bar' => array('baz'));

// encoding
try {
    $encoder = new Rison\RisonEncoder($data);
    $rison   = $encoder->encode();
    var_dump($rison);
} catch (InvalidArgumentException $e) {
    echo $e->getMessage();
}

// decoding
try {
    $decoder = new Rison\RisonDecoder($rison);
    $data    = $decoder->decode();
    var_dump($data);
} catch (Rison\RisonParseErrorException $e) {
    echo $e->getMessage(), ' in string: ', $e->getRison();
} catch (InvalidArgumentException $e) {
    echo $e->getMessage();
}
```

PSR-0
-----

[](#psr-0)

The repository is organized so its contents can be dumped into a folder `Kunststube/Rison/` and the naming be PSR-0 compliant.

Information
-----------

[](#information)

Version: 0.92
Author: David Zentgraf
Contact:
License: Public Domain

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity40

Moderate usage in the ecosystem

Community14

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~409 days

Total

3

Last Release

4116d ago

PHP version history (2 changes)0.91PHP &gt;=5.4.0

0.92PHP &gt;=5.3.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/07608e79148cc603ea851ef6f62daa4a19e1b32a97a9d62f14a2d97f5e985f19?d=identicon)[deceze](/maintainers/deceze)

---

Top Contributors

[![deceze](https://avatars.githubusercontent.com/u/137217?v=4)](https://github.com/deceze "deceze (14 commits)")

---

Tags

encodedecoderison

### Embed Badge

![Health badge](/badges/kunststube-rison/health.svg)

```
[![Health](https://phpackages.com/badges/kunststube-rison/health.svg)](https://phpackages.com/packages/kunststube-rison)
```

###  Alternatives

[hashids/hashids

Generate short, unique, non-sequential ids (like YouTube and Bitly) from numbers

5.4k48.6M278](/packages/hashids-hashids)[christian-riesen/base32

Base32 encoder/decoder according to RFC 4648

13331.8M61](/packages/christian-riesen-base32)[sqids/sqids

Generate short YouTube-looking IDs from numbers

5781.4M33](/packages/sqids-sqids)[torann/hashids

Laravel package for Hashids

54335.1k](/packages/torann-hashids)[skleeschulte/base32

Base32 encoding and decoding class (RFC 4648, RFC 4648 extended hex, Crockford, z-base-32/Zooko).

17314.5k9](/packages/skleeschulte-base32)[dflydev/base32-crockford

Encode/decode numbers using Douglas Crockford's Base32 Encoding

14379.1k1](/packages/dflydev-base32-crockford)

PHPackages © 2026

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