https://github.com/piedweb/rison
[PHP] Rison : a data serialization format optimized for compactness in URIs
https://github.com/piedweb/rison
Last synced: 9 months ago
JSON representation
[PHP] Rison : a data serialization format optimized for compactness in URIs
- Host: GitHub
- URL: https://github.com/piedweb/rison
- Owner: PiedWeb
- License: mit
- Created: 2025-03-11T12:53:23.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-09-20T17:13:19.000Z (10 months ago)
- Last Synced: 2025-09-22T02:55:04.984Z (10 months ago)
- Language: PHP
- Size: 9.77 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# PHP Rison encoder - decoder
[](https://github.com/PiedWeb/Rison/tags)
[](LICENSE)
[](https://github.com/PiedWeb/Rison/actions)
[](https://scrutinizer-ci.com/g/PiedWeb/Rison)
[](https://codecov.io/gh/PiedWeb/Rison/branch/main)
[](https://shepherd.dev/github/PiedWeb/Rison)
[](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
Via [Packagist](https://img.shields.io/packagist/dt/piedweb/rison.svg?style=flat)
```bash
$ composer require piedweb/rison
```
## Usage
```php
use \PiedWeb\Rison\...;
```
## About rison
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')
```
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
Please see [contributing](https://dev.piedweb.com/contributing)
## 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
The MIT License (MIT). Please see [License File](LICENSE) for more information.