PHPackages                             wyrihaximus/json-utilities - 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. wyrihaximus/json-utilities

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

wyrihaximus/json-utilities
==========================

Utilities for php-json-\* packages

1.4.0(8mo ago)5328.8k↓34.3%1[1 issues](https://github.com/WyriHaximus/php-json-utilities/issues)[5 PRs](https://github.com/WyriHaximus/php-json-utilities/pulls)2MITMakefilePHP ^8.4CI passing

Since Mar 3Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/WyriHaximus/php-json-utilities)[ Packagist](https://packagist.org/packages/wyrihaximus/json-utilities)[ GitHub Sponsors](https://github.com/WyriHaximus)[ RSS](/packages/wyrihaximus-json-utilities/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (6)Dependencies (2)Versions (13)Used By (2)

Utilities for my php-json-\* packages
=====================================

[](#utilities-for-my-php-json--packages)

[![Continuous Integration](https://github.com/WyriHaximus/php-json-utilities/workflows/Continuous%20Integration/badge.svg)](https://github.com/WyriHaximus/php-json-utilities/workflows/Continuous%20Integration/badge.svg)[![Latest Stable Version](https://camo.githubusercontent.com/e6971e9b8ac6daed53d9ae073c1a35f42bd1c975963fe71a48e4a2460467a949/68747470733a2f2f706f7365722e707567782e6f72672f57797269486178696d75732f6a736f6e2d7574696c69746965732f762f737461626c652e706e67)](https://packagist.org/packages/WyriHaximus/json-utilities)[![Total Downloads](https://camo.githubusercontent.com/1231285d8d1f72406d47666f0b5fb9b53e5e2772c65654c6afb1f6ca5b1014ed/68747470733a2f2f706f7365722e707567782e6f72672f57797269486178696d75732f6a736f6e2d7574696c69746965732f646f776e6c6f6164732e706e67)](https://packagist.org/packages/WyriHaximus/json-utilities)[![License](https://camo.githubusercontent.com/01f0861327a7473252657dfd143d66a74343bf99673e253cf4f09974a32008e9/68747470733a2f2f706f7365722e707567782e6f72672f57797269486178696d75732f6a736f6e2d7574696c69746965732f6c6963656e73652e706e67)](https://packagist.org/packages/wyrihaximus/json-utilities)

### Installation

[](#installation)

To install via [Composer](http://getcomposer.org/), use the command below, it will automatically detect the latest version and bind it with `~`.

```
composer require wyrihaximus/json-utilities

```

Available functions
===================

[](#available-functions)

### validate\_array

[](#validate_array)

Validates an array by checking if the list of required keys all can be found in the passed array. On success it will return `true`, when it comes across a key it can find in the array it will return `false`. How ever then passed an exception it will create that exception by passing the array as first argument and the missing key as second argument to the constructor.

```
$array = ['key', 'another_key', 'required_key']; //

$requiredKeys = ['required_key'];

validate_array($array, $requiredKeys, ExceptionToBeTrownWhenAKeyIsMissing::class);
```

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

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

License
-------

[](#license)

Copyright 2025 [Cees-Jan Kiewiet](http://wyrihaximus.net/)

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

###  Health Score

58

—

FairBetter than 98% of packages

Maintenance70

Regular maintenance activity

Popularity39

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity88

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 52.6% 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 ~548 days

Recently: every ~611 days

Total

6

Last Release

254d ago

PHP version history (5 changes)1.0.0PHP ^7.0

1.1.0PHP ^7.2

1.2.0PHP ^7.4

1.3.0PHP ^8 || ^7.4

1.4.0PHP ^8.4

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/147145?v=4)[Cees-Jan Kiewiet](/maintainers/WyriHaximus)[@WyriHaximus](https://github.com/WyriHaximus)

---

Top Contributors

[![WyriHaximus](https://avatars.githubusercontent.com/u/147145?v=4)](https://github.com/WyriHaximus "WyriHaximus (60 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (36 commits)")[![dependabot-support](https://avatars.githubusercontent.com/u/112581971?v=4)](https://github.com/dependabot-support "dependabot-support (13 commits)")[![renovate-runner[bot]](https://avatars.githubusercontent.com/u/147145?v=4)](https://github.com/renovate-runner[bot] "renovate-runner[bot] (5 commits)")

---

Tags

hacktoberfestjsonphpphp5php7

### Embed Badge

![Health badge](/badges/wyrihaximus-json-utilities/health.svg)

```
[![Health](https://phpackages.com/badges/wyrihaximus-json-utilities/health.svg)](https://phpackages.com/packages/wyrihaximus-json-utilities)
```

###  Alternatives

[cwspear/bootstrap-hover-dropdown

An unofficial Bootstrap plugin to enable Bootstrap dropdowns to activate on hover and provide a nice user experience.

1.3k153.1k](/packages/cwspear-bootstrap-hover-dropdown)[jeroendesloovere/distance

Get distance between two locations using PHP.

3462.8k](/packages/jeroendesloovere-distance)[dintel/php-github-webhook

Simple class for handling GitHub webhook calls

5115.5k](/packages/dintel-php-github-webhook)[spatie/filament-simple-stats

Opinionated prebuilt stat widgets to quickly add to your Filament dashboards.

2317.9k](/packages/spatie-filament-simple-stats)

PHPackages © 2026

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