PHPackages                             piedweb/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. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. piedweb/rison

ActiveLibrary[Parsing &amp; Serialization](/categories/parsing)

piedweb/rison
=============

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

0.1.891(1mo ago)11.4k↑100%MITPHPPHP &gt;=8.4

Since Mar 11Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/PiedWeb/rison)[ Packagist](https://packagist.org/packages/piedweb/rison)[ Docs](https://dev.piedweb.com)[ RSS](/packages/piedweb-rison/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (48)Used By (0)

[![Open Source Package](https://raw.githubusercontent.com/PiedWeb/piedweb-devoluix-theme/master/src/img/logo_title.png)](https://dev.piedweb.com)

PHP Rison encoder - decoder
===========================

[](#php-rison-encoder---decoder)

[![Latest Version](https://camo.githubusercontent.com/0d06f6bbe56c515f141e671d3b61f9d210f9465f224f26eefb9a3ded172e9561/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f7461672f506965645765622f5269736f6e2e7376673f7374796c653d666c6174266c6162656c3d72656c65617365)](https://github.com/PiedWeb/Rison/tags)[![Software License](https://camo.githubusercontent.com/f251623e510f5909f16ae3f4e6e548dac11340b9fde1a99be26b015b39272c00/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c6174)](LICENSE)[![GitHub Tests Action Status](https://camo.githubusercontent.com/704d82b711993f4f7a891f543735587f4ae69383485290332dbe48dcb40aa9cb/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f506965645765622f5269736f6e2f54657374733f6c6162656c3d7465737473)](https://github.com/PiedWeb/Rison/actions)[![Quality Score](https://camo.githubusercontent.com/05d784f4eeaa6f61365703d36be3b7302722510133a1bd5f77e866e3b856f121/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f506965645765622f5269736f6e2e7376673f7374796c653d666c6174)](https://scrutinizer-ci.com/g/PiedWeb/Rison)[![Code Coverage](https://camo.githubusercontent.com/96a77e1cc3af31f6847e9da1a81712114699fe85598eb09637d6cafc5ab9dcd1/68747470733a2f2f636f6465636f762e696f2f67682f506965645765622f5269736f6e2f6272616e63682f6d61696e2f67726170682f62616467652e737667)](https://codecov.io/gh/PiedWeb/Rison/branch/main)[![Type Coverage](https://camo.githubusercontent.com/17a5bda5382ec338a1ba84fb00f5b40a365f32efa092bc0d83379d13fff7af2c/68747470733a2f2f73686570686572642e6465762f6769746875622f506965645765622f5269736f6e2f636f7665726167652e737667)](https://shepherd.dev/github/PiedWeb/Rison)[![Total Downloads](https://camo.githubusercontent.com/bd23412d2b1b59ad5473853550c700f43ce180b408a0ba98b8d6b0e4fda9c190/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f706965647765622f7269736f6e2e7376673f7374796c653d666c6174)](https://packagist.org/packages/piedweb/rison)

Rison is a compact data format optimized for URIs, a slight variation of JSON. This is a port from JS rison, forked from [Marmelatze](https://github.com/Marmelatze/Kunststube-Rison)

Install
-------

[](#install)

Via [Packagist](https://img.shields.io/packagist/dt/piedweb/rison.svg?style=flat)

```
$ composer require piedweb/rison
```

Usage
-----

[](#usage)

```
use \PiedWeb\Rison\...;
```

About rison
-----------

[](#about-rison)

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')

```

Learn more about Rison :

- [Mirror of original rison specs and js/python port](https://github.com/Nanonid/rison?tab=readme-ov-file)
- [ESModule Rison port](https://github.com/othree/rison-esm)
- [Rison playground](https://rison.dev)

Contributing
------------

[](#contributing)

Please see [contributing](https://dev.piedweb.com/contributing)

Credits
-------

[](#credits)

- Original version by [Marmelatze](https://github.com/Marmelatze/Kunststube-Rison)
- Forked and updated to modern PHP by [Robin Delattre (Pied Web)](https://piedweb.com)
- [All Contributors](https://github.com/PiedWeb/:package_skake/graphs/contributors)

License
-------

[](#license)

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

###  Health Score

47

—

FairBetter than 94% of packages

Maintenance90

Actively maintained with recent releases

Popularity21

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity58

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 ~8 days

Total

47

Last Release

49d ago

PHP version history (2 changes)0.1.845PHP &gt;=8.3

0.1.878PHP &gt;=8.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/afce4cf517928a50560237f1410d5957271fd808671b2216687ecf1422adaee0?d=identicon)[Robin D.](/maintainers/Robin%20D.)

---

Top Contributors

[![actions-user](https://avatars.githubusercontent.com/u/65916846?v=4)](https://github.com/actions-user "actions-user (7 commits)")

---

Tags

jsonencodedecodePied Webrison

### Embed Badge

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

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

###  Alternatives

[yethee/tiktoken

PHP version of tiktoken

1583.1M15](/packages/yethee-tiktoken)[kherge/json

Encodes, decodes, and validates JSON data.

61226.6k6](/packages/kherge-json)[gioni06/gpt3-tokenizer

PHP package for Byte Pair Encoding (BPE) used by GPT-3.

85537.5k8](/packages/gioni06-gpt3-tokenizer)[devium/toml

A PHP encoder/decoder for TOML compatible with specification 1.0.0

3968.9k13](/packages/devium-toml)[pmjones/throwable-properties

Copies properties of a Throwable to a serializable object.

1554.7k2](/packages/pmjones-throwable-properties)[rickselby/nbt

Parser/Writer for the NBT file format

171.2k1](/packages/rickselby-nbt)

PHPackages © 2026

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