{"id":23413189,"url":"https://github.com/beste/json","last_synced_at":"2025-07-19T03:36:48.734Z","repository":{"id":60774226,"uuid":"458641857","full_name":"beste/json","owner":"beste","description":"A simple JSON helper to decode and encode JSON","archived":false,"fork":false,"pushed_at":"2025-05-12T07:36:30.000Z","size":86,"stargazers_count":33,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-20T04:04:01.325Z","etag":null,"topics":["helper","json","php"],"latest_commit_sha":null,"homepage":"","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/beste.png","metadata":{"funding":{"github":"jeromegamez"},"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2022-02-12T21:18:55.000Z","updated_at":"2025-05-12T07:36:28.000Z","dependencies_parsed_at":"2024-03-22T08:51:27.164Z","dependency_job_id":"b1c97ee1-ee2e-4bc8-8b53-5b1a96e58a65","html_url":"https://github.com/beste/json","commit_stats":{"total_commits":16,"total_committers":2,"mean_commits":8.0,"dds":0.1875,"last_synced_commit":"8b8a2e55426cd8035dd72e3b422388e08a39b243"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/beste/json","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beste%2Fjson","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beste%2Fjson/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beste%2Fjson/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beste%2Fjson/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/beste","download_url":"https://codeload.github.com/beste/json/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beste%2Fjson/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265883680,"owners_count":23843800,"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":["helper","json","php"],"created_at":"2024-12-22T19:29:29.088Z","updated_at":"2025-07-19T03:36:48.712Z","avatar_url":"https://github.com/beste.png","language":"PHP","funding_links":["https://github.com/sponsors/jeromegamez"],"categories":[],"sub_categories":[],"readme":"# JSON\n\n[![Current version](https://img.shields.io/packagist/v/beste/json.svg?logo=composer)](https://packagist.org/packages/beste/json)\n[![Supported PHP version](https://img.shields.io/static/v1?logo=php\u0026label=PHP\u0026message=~7.4.0%20||%20~8.0.0%20||%20~8.1.0\u0026color=777bb4)](https://packagist.org/packages/beste/json)\n[![Tests](https://github.com/beste/json/workflows/Tests/badge.svg)](https://github.com/beste/json/actions)\n[![Discord](https://img.shields.io/discord/807679292573220925.svg?color=7289da\u0026logo=discord)](https://discord.gg/Yacm7unBsr)\n[![Sponsor](https://img.shields.io/static/v1?logo=GitHub\u0026label=Sponsor\u0026message=%E2%9D%A4\u0026color=ff69b4)](https://github.com/sponsors/jeromegamez)\n\nA simple helper to decode and encode JSON, including from files.\n\n## Usage\n\n```php\nuse Beste\\Json;\nuse UnexpectedValueException;\n\n$object = Json::decode('{\"key\": \"value\"}');\n\n$array = Json::decode('{\"key\": \"value\"}', $forceArray = true);\n\n$object = Json::decodeFile('/path/to/file.json');\n\n$json = Json::encode($object);\n\n$prettyJson = Json::pretty($object);\n\n// When something goes wring while decoding/encoding,\n// an `UnexpectedValueException` is thrown\ntry {\n    Json::decode('{]');\n} catch (UnexpectedValueException $e) {\n    // Handle error\n}\n```\n\n## Installation\n\n```shell\ncomposer require beste/json\n```\n\n## Running tests\n\n```shell\ncomposer test\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbeste%2Fjson","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbeste%2Fjson","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbeste%2Fjson/lists"}