{"id":20235313,"url":"https://github.com/phphleb/nicejson","last_synced_at":"2026-01-30T13:19:13.234Z","repository":{"id":57040510,"uuid":"313574338","full_name":"phphleb/nicejson","owner":"phphleb","description":"Convert json to readable form","archived":false,"fork":false,"pushed_at":"2024-12-06T00:28:51.000Z","size":8,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-10T16:54:34.507Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":false,"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/phphleb.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2020-11-17T09:49:56.000Z","updated_at":"2024-01-29T14:14:20.000Z","dependencies_parsed_at":"2025-09-22T05:32:47.121Z","dependency_job_id":"ff81515e-6ac0-4aa3-a87a-19f8147e235c","html_url":"https://github.com/phphleb/nicejson","commit_stats":{"total_commits":8,"total_committers":1,"mean_commits":8.0,"dds":0.0,"last_synced_commit":"765deafd05e3cc7173b1e7d10755a7ecdbda8d3f"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/phphleb/nicejson","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phphleb%2Fnicejson","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phphleb%2Fnicejson/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phphleb%2Fnicejson/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phphleb%2Fnicejson/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/phphleb","download_url":"https://codeload.github.com/phphleb/nicejson/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phphleb%2Fnicejson/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28913882,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-30T12:13:43.263Z","status":"ssl_error","status_checked_at":"2026-01-30T12:13:22.389Z","response_time":66,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":[],"created_at":"2024-11-14T08:15:52.865Z","updated_at":"2026-01-30T13:19:13.218Z","avatar_url":"https://github.com/phphleb.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"NICEJSON\n=====================\n\n[![HLEB1](https://img.shields.io/badge/HLEB-1-olive)](https://github.com/phphleb/hleb) [![HLEB2](https://img.shields.io/badge/HLEB-2-darkcyan)](https://github.com/phphleb/hleb) ![PHP](https://img.shields.io/badge/PHP-^8.2-blue) [![License: MIT](https://img.shields.io/badge/License-MIT%20(Free)-brightgreen.svg)](https://github.com/phphleb/hleb/blob/master/LICENSE)\n\n[Previous code](![PHP](https://phphleb/nicejson)) for PHP version \u003c 8.2\n\n###  Convert json to readable form\n\n Install using Composer:\n ```bash\ncomposer require phphleb/nicejson\n ```\n-----------------------------------------\n\nConvert\n ```json\n{\"example\":[\"first\",\"second\"]}\n ```\nto\n ```json\n{\n    \"example\": [\n        \"first\",\n        \"second\"\n    ]\n}\n ```\n\n ```php\n$data = '{\"example\":[\"first\",\"second\"]}'; // string json\nfile_put_contents('/path/to/result/json/file/', (new \\Phphleb\\Nicejson\\JsonConverter())-\u003eget($data));\n ```\nor\n\n ```php\n$data = [\"example\"=\u003e[\"first\",\"second\"]]; // array\nfile_put_contents('/path/to/result/json/file/', (new \\Phphleb\\Nicejson\\JsonConverter())-\u003eget($data));\n ```\nor\n\n ```php\n$data = (object) [\"example\"=\u003e[\"first\",\"second\"]]; // object\nfile_put_contents('/path/to/result/json/file/', (new \\Phphleb\\Nicejson\\JsonConverter())-\u003eget($data));\n ```\n\nadd flag to json_encode(...)\n\n ```php\nuse Phphleb\\Nicejson\\JsonConverter;\n$jsonConverterObject = new JsonConverter(JSON_FORCE_OBJECT);\n ```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphphleb%2Fnicejson","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphphleb%2Fnicejson","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphphleb%2Fnicejson/lists"}