fork of mmccook/php-json-canonicalization-scheme
This repository has been archived on 2025年06月28日 . You can view files and clone it, but you cannot make any changes to its state, such as pushing and creating new issues, pull requests or comments.
- PHP 100%
|
|
||
|---|---|---|
| .github | initial commit | |
| src | fix floats | |
| tests | Merge branch 'main' of https://github.com/mmccook/php-json-canonicalization-scheme | |
| .editorconfig | Initial commit | |
| .gitattributes | Initial commit | |
| .gitignore | Initial commit | |
| .php-cs-fixer.dist.php | Initial commit | |
| CHANGELOG.md | initial commit | |
| composer.json | change composer path | |
| LICENSE.md | initial commit | |
| phpunit.xml.dist | initial commit | |
| README.md | updated README | |
JSON Canonicalization for PHP 8.1+
Latest Version on Packagist Tests Total Downloads
Needed a way to canonicalize JSON to validate webhooks from The Campaign Registry couldn't find an actively maintained package that all passed the JCS tests, so I used the one listed on the JCS Github and updated/refactored it.
Installation
You can install the package via composer:
composer require mmccook/php-json-canonicalization-scheme
Usage
$canonicalization = JsonCanonicalizatorFactory::getInstance();
$canonicalizedJsonString = $canonicalization->canonicalize($input);
Testing
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Credits
License
The MIT License (MIT). Please see License File for more information.