{"id":15296243,"url":"https://github.com/wyrihaximus/php-json-utilities","last_synced_at":"2025-04-13T19:40:53.355Z","repository":{"id":37547374,"uuid":"123729052","full_name":"WyriHaximus/php-json-utilities","owner":"WyriHaximus","description":"Utilities for php-json-* packages","archived":false,"fork":false,"pushed_at":"2023-12-05T02:27:58.000Z","size":340,"stargazers_count":5,"open_issues_count":2,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-05-02T05:37:45.263Z","etag":null,"topics":["hacktoberfest","json","php","php5","php7"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/WyriHaximus.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"WyriHaximus"}},"created_at":"2018-03-03T20:34:08.000Z","updated_at":"2024-06-19T17:12:33.747Z","dependencies_parsed_at":"2023-12-05T03:29:16.510Z","dependency_job_id":"15d827e2-f9b0-42e3-beb2-948475e4b1cd","html_url":"https://github.com/WyriHaximus/php-json-utilities","commit_stats":{"total_commits":56,"total_committers":3,"mean_commits":"18.666666666666668","dds":0.5,"last_synced_commit":"64c27cc44e37075944debd31196349b903b3aea5"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WyriHaximus%2Fphp-json-utilities","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WyriHaximus%2Fphp-json-utilities/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WyriHaximus%2Fphp-json-utilities/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WyriHaximus%2Fphp-json-utilities/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/WyriHaximus","download_url":"https://codeload.github.com/WyriHaximus/php-json-utilities/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248770211,"owners_count":21158938,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["hacktoberfest","json","php","php5","php7"],"created_at":"2024-09-30T18:09:49.731Z","updated_at":"2025-04-13T19:40:53.327Z","avatar_url":"https://github.com/WyriHaximus.png","language":"PHP","funding_links":["https://github.com/sponsors/WyriHaximus"],"categories":[],"sub_categories":[],"readme":"# Utilities for my php-json-* packages\n\n![Continuous Integration](https://github.com/WyriHaximus/php-json-utilities/workflows/Continuous%20Integration/badge.svg)\n[![Latest Stable Version](https://poser.pugx.org/WyriHaximus/json-utilities/v/stable.png)](https://packagist.org/packages/WyriHaximus/json-utilities)\n[![Total Downloads](https://poser.pugx.org/WyriHaximus/json-utilities/downloads.png)](https://packagist.org/packages/WyriHaximus/json-utilities)\n[![Code Coverage](https://scrutinizer-ci.com/g/WyriHaximus/php-json-utilities/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/WyriHaximus/php-json-utilities/?branch=master)\n[![License](https://poser.pugx.org/WyriHaximus/json-utilities/license.png)](https://packagist.org/packages/wyrihaximus/json-utilities)\n[![PHP 7 ready](http://php7ready.timesplinter.ch/WyriHaximus/php-json-utilities/badge.svg)](https://travis-ci.org/WyriHaximus/php-json-utilities)\n\n### Installation ###\n\nTo install via [Composer](http://getcomposer.org/), use the command below, it will automatically detect the latest version and bind it with `~`.\n\n```\ncomposer require wyrihaximus/json-utilities\n```\n\n# Available functions\n\n### validate_array\n\nValidates an array by checking if the list of required keys all can be found in the passed array. On success it will\nreturn `true`, when it comes across a key it can find in the array it will return `false`. How ever then passed an\nexception it will create that exception by passing the array as first argument and the missing key as second argument\nto the constructor.\n\n```php\n$array = ['key', 'another_key', 'required_key']; //\n\n$requiredKeys = ['required_key'];\n\nvalidate_array($array, $requiredKeys, ExceptionToBeTrownWhenAKeyIsMissing::class);\n```\n\n## Contributing ##\n\nPlease see [CONTRIBUTING](CONTRIBUTING.md) for details.\n\n## License ##\n\nCopyright 2018 [Cees-Jan Kiewiet](http://wyrihaximus.net/)\n\nPermission is hereby granted, free of charge, to any person\nobtaining a copy of this software and associated documentation\nfiles (the \"Software\"), to deal in the Software without\nrestriction, including without limitation the rights to use,\ncopy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following\nconditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\nOF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\nHOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\nWHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\nOTHER DEALINGS IN THE SOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwyrihaximus%2Fphp-json-utilities","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwyrihaximus%2Fphp-json-utilities","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwyrihaximus%2Fphp-json-utilities/lists"}