{"id":13828508,"url":"https://github.com/jannejava/json","last_synced_at":"2026-01-11T16:51:46.440Z","repository":{"id":56974248,"uuid":"132950423","full_name":"jannejava/json","owner":"jannejava","description":" A simple wrapper around json_encode() and json_decode() for catching any errors without executing json_last_error()","archived":false,"fork":false,"pushed_at":"2024-05-07T07:17:21.000Z","size":37,"stargazers_count":93,"open_issues_count":0,"forks_count":5,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-11-14T13:44:32.802Z","etag":null,"topics":["json","laravel"],"latest_commit_sha":null,"homepage":"https://eastwest.se","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/jannejava.png","metadata":{"files":{"readme":"README.md","changelog":null,"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,"publiccode":null,"codemeta":null}},"created_at":"2018-05-10T20:21:54.000Z","updated_at":"2024-05-07T07:17:25.000Z","dependencies_parsed_at":"2024-06-18T16:50:18.716Z","dependency_job_id":"a958f490-751c-4777-ad70-471983e20cb1","html_url":"https://github.com/jannejava/json","commit_stats":{"total_commits":25,"total_committers":3,"mean_commits":8.333333333333334,"dds":0.12,"last_synced_commit":"c9f6bef6ff33b38a0c714b08c593e9758907a00a"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jannejava%2Fjson","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jannejava%2Fjson/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jannejava%2Fjson/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jannejava%2Fjson/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jannejava","download_url":"https://codeload.github.com/jannejava/json/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225492420,"owners_count":17482869,"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":["json","laravel"],"created_at":"2024-08-04T09:02:49.850Z","updated_at":"2026-01-11T16:51:46.433Z","avatar_url":"https://github.com/jannejava.png","language":"PHP","funding_links":[],"categories":["PHP"],"sub_categories":[],"readme":"# Wrap JSON encoding/decoding errors in exception\n\nCatch `json_encode()` and `json_decode()` errors without executing `json_last_error()`. In PHP 7.3 these functions will [throw an exception](https://laravel-news.com/php-7-3-json-error-handling).\n\n```php\n\nuse Eastwest\\Json\\Json;\nuse Eastwest\\Json\\JsonException;\n\ntry {\n    $json = Json::encode(['key' =\u003e 'value']);\n} catch (JsonException $e) {\n    // code and message will match json_last_error() values:\n    // @link http://php.net/manual/en/function.json-last-error.php#refsect1-function.json-last-error-returnvalues \n    echo $e-\u003egetMessage();\n    echo $e-\u003egetCode();\n}\n```\n\n## Installation\nYou'll have to follow a couple of simple steps to install this package.\n\n### Downloading\nVia [composer](http://getcomposer.org):\n\n```bash\n$ composer require eastwest/json:^3.0\n```\n\nOr add the package to your development dependencies in `composer.json` and run\n`composer update eastwest/json` to download the package:\n\n```json\n{\n    \"require\": {\n        \"eastwest/json\": \"^3.0\"\n    }\n}\n```\n\n*If you need a way to deploy files or manage your Laravel Forge servers. Take a look at [GitFTP-Deploy](https://gitftp-deploy.com) or [F-Bar](https://laravel-forge-menubar.com)*\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjannejava%2Fjson","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjannejava%2Fjson","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjannejava%2Fjson/lists"}