{"id":22900442,"url":"https://github.com/kapitanluffy/json-object","last_synced_at":"2026-05-05T05:31:55.895Z","repository":{"id":57004395,"uuid":"131096992","full_name":"kapitanluffy/json-object","owner":"kapitanluffy","description":"Treat JSON as objects in PHP instead of strings.","archived":false,"fork":false,"pushed_at":"2018-04-26T04:01:14.000Z","size":7,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-07T03:25:40.502Z","etag":null,"topics":["json","php"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kapitanluffy.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}},"created_at":"2018-04-26T03:50:03.000Z","updated_at":"2018-06-08T18:07:09.000Z","dependencies_parsed_at":"2022-08-21T12:10:53.218Z","dependency_job_id":null,"html_url":"https://github.com/kapitanluffy/json-object","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kapitanluffy%2Fjson-object","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kapitanluffy%2Fjson-object/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kapitanluffy%2Fjson-object/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kapitanluffy%2Fjson-object/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kapitanluffy","download_url":"https://codeload.github.com/kapitanluffy/json-object/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246586048,"owners_count":20801026,"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","php"],"created_at":"2024-12-14T01:20:06.362Z","updated_at":"2026-05-05T05:31:50.873Z","avatar_url":"https://github.com/kapitanluffy.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PHP JSON Objects\n\nTreat JSON as objects in PHP instead of strings.\n\n##### Install\n\n```\ncomposer require kapitanluffy/json-object\n```\n\n##### Usage\n\n```php\n$json = new JsonObject($data);\n\n// encoding to json\n$encoded = json_encode($json);\n$encoded = $json-\u003eencode();\n$encoded = (string) $json;\n\n// decoding to data\n$decoded = JsonObject::decode($json);\n\n// set options\n$json-\u003eoptions(JSON_NUMERIC_CHECK)-\u003eencode();\n\n// throw a JsonException on error\n$json-\u003ewithErrors(true)-\u003eencode();\n\n// check if the current instance throws an error\n$json-\u003eisErrorThrown();\n\n// returns the last occurred JsonException\nJsonObject::getError();\n```\n\nNote that methods `options` and `withErrors` returns a new instance rather than modifying the current JsonObject instance.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkapitanluffy%2Fjson-object","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkapitanluffy%2Fjson-object","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkapitanluffy%2Fjson-object/lists"}