piedweb / rison
A PHP encoder and decoder for Rison, the compact JSON-like data format optimized for URIs.
0.1.846
2025-03-11 12:54 UTC
Requires
- php: >=8.3
README
PHP Rison encoder - decoder
Rison is a compact data format optimized for URIs, a slight variation of JSON. This is a port from JS rison, forked from Marmelatze
Install
Via Packagist
$ composer require piedweb/rison
Usage
use \PiedWeb\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 :
Contributing
Please see contributing
Credits
- Original version by Marmelatze
- Forked and updated to modern PHP by Robin Delattre (Pied Web)
- All Contributors
License
The MIT License (MIT). Please see License File for more information.