PHPackages                             mmccook/php-json-canonicalization-scheme - 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. mmccook/php-json-canonicalization-scheme

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

mmccook/php-json-canonicalization-scheme
========================================

This is my package php-json-canonicalization-scheme

1.0.0(2y ago)311.0k↑33.3%1[1 issues](https://github.com/mmccook/php-json-canonicalization-scheme/issues)[2 PRs](https://github.com/mmccook/php-json-canonicalization-scheme/pulls)MITPHPPHP ^8.1

Since Aug 7Pushed 2y ago2 watchersCompare

[ Source](https://github.com/mmccook/php-json-canonicalization-scheme)[ Packagist](https://packagist.org/packages/mmccook/php-json-canonicalization-scheme)[ Docs](https://github.com/mmccook/php-json-canonicalization-scheme)[ GitHub Sponsors](https://github.com/mmccook)[ RSS](/packages/mmccook-php-json-canonicalization-scheme/feed)WikiDiscussions main Synced yesterday

READMEChangelogDependencies (4)Versions (4)Used By (0)

JSON Canonicalization for PHP 8.1+
==================================

[](#json-canonicalization-for-php-81)

[![Latest Version on Packagist](https://camo.githubusercontent.com/80190db39b794ea9671a3603819ca5e7bbb6ad4eea6d5728b62b292d93cbbd52/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d6d63636f6f6b2f7068702d6a736f6e2d63616e6f6e6963616c697a6174696f6e2d736368656d652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/mmccook/php-json-canonicalization-scheme)[![Tests](https://camo.githubusercontent.com/8c6a44578bdf599724fe9bc5a0fb1d956c88fab32c6c474639cb6226b5bae3af/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6d6d63636f6f6b2f7068702d6a736f6e2d63616e6f6e6963616c697a6174696f6e2d736368656d652f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/mmccook/php-json-canonicalization-scheme/actions/workflows/run-tests.yml)[![Total Downloads](https://camo.githubusercontent.com/e27dc722471fabe08e283371aefa583018925182558ddce541e28c9deef0501c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6d6d63636f6f6b2f7068702d6a736f6e2d63616e6f6e6963616c697a6174696f6e2d736368656d652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/mmccook/php-json-canonicalization-scheme)

Needed a way to canonicalize JSON to validate webhooks from [The Campaign Registry](https://csp-api.campaignregistry.com/v2/restAPI)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
------------

[](#installation)

You can install the package via composer:

```
composer require mmccook/php-json-canonicalization-scheme
```

Usage
-----

[](#usage)

```
$canonicalization = JsonCanonicalizatorFactory::getInstance();
$canonicalizedJsonString = $canonicalization->canonicalize($input);
```

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

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

[](#contributing)

Please see [CONTRIBUTING](https://github.com/spatie/.github/blob/main/CONTRIBUTING.md) for details.

Credits
-------

[](#credits)

- [Mark M. McCook](https://github.com/mmccook)

License
-------

[](#license)

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

###  Health Score

30

—

LowBetter than 62% of packages

Maintenance13

Infrequent updates — may be unmaintained

Popularity30

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity55

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

Unknown

Total

1

Last Release

1060d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/394ee5fab061e8992e8013f3e01dcf5203e3395b993b9a5c0040b2592d66fa7c?d=identicon)[mmccook](/maintainers/mmccook)

---

Top Contributors

[![mmccook](https://avatars.githubusercontent.com/u/149747?v=4)](https://github.com/mmccook "mmccook (21 commits)")

---

Tags

mmccookphp-json-canonicalization-scheme

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/mmccook-php-json-canonicalization-scheme/health.svg)

```
[![Health](https://phpackages.com/badges/mmccook-php-json-canonicalization-scheme/health.svg)](https://phpackages.com/packages/mmccook-php-json-canonicalization-scheme)
```

###  Alternatives

[stevenay/myanfont

Zawgyi and Unicode Font Detector and Converter

167.8k2](/packages/stevenay-myanfont)

PHPackages © 2026

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