{"id":22071270,"url":"https://github.com/lancejpollard/pretty-compact-json.js","last_synced_at":"2026-05-04T02:40:06.298Z","repository":{"id":66858539,"uuid":"566239602","full_name":"lancejpollard/pretty-compact-json.js","owner":"lancejpollard","description":"Prettify JSON in a more compact, human-readable way","archived":false,"fork":false,"pushed_at":"2022-11-15T10:57:52.000Z","size":6,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"make","last_synced_at":"2025-01-29T01:59:32.898Z","etag":null,"topics":["javascript-library","json","prettify","pretty-print"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lancejpollard.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2022-11-15T08:58:53.000Z","updated_at":"2022-11-16T02:25:30.000Z","dependencies_parsed_at":null,"dependency_job_id":"f740c433-4b43-4240-9644-34de878ba13b","html_url":"https://github.com/lancejpollard/pretty-compact-json.js","commit_stats":null,"previous_names":["haresurf/pretty-compact-json.js","termhare/pretty-compact-json.js","lancejpollard/pretty-compact-json.js"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lancejpollard%2Fpretty-compact-json.js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lancejpollard%2Fpretty-compact-json.js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lancejpollard%2Fpretty-compact-json.js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lancejpollard%2Fpretty-compact-json.js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lancejpollard","download_url":"https://codeload.github.com/lancejpollard/pretty-compact-json.js/tar.gz/refs/heads/make","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245153896,"owners_count":20569408,"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":["javascript-library","json","prettify","pretty-print"],"created_at":"2024-11-30T20:29:45.142Z","updated_at":"2026-05-04T02:40:01.270Z","avatar_url":"https://github.com/lancejpollard.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Pretty Compact JSON\n\nJavaScript library for prettifying JSON in a compact, more human-readable way.\n\n```\nyarn add @lancejpollard/pretty-compact-json.js\n```\n\n\u003c!-- prettier-ignore --\u003e\n```js\nconst prettify1 = require(\"@lancejpollard/pretty-compact-json.js/1\");\nconst prettify2 = require(\"@lancejpollard/pretty-compact-json.js/2\");\n```\n\nGiven this input:\n\n```json\n{\n  \"a\": [\n    {\n      \"name\": \"foo\",\n      \"value\": 123\n    }\n  ],\n  \"b\": {\n    \"x\": [1, 2, 3],\n    \"y\": {\n      \"z\": 10\n    },\n    \"w\": {\n      \"a\": {\n        \"b\": {\n          \"c\": 456,\n          \"d\": 789,\n          \"e\": \"hello world\",\n          \"f\": { \"g\": true, \"p\": [1, { \"q\": 2, \"v\": \"bar\" }, 3] }\n        }\n      }\n    }\n  },\n  \"c\": [{ \"a\": { \"b\": 111, \"c\": 222 } }, 1, null, { \"x\": 3 }],\n  \"d\": \"random\"\n}\n```\n\n```js\nprettify1(input);\n```\n\n\u003c!-- prettier-ignore --\u003e\n```json\n{\n  \"a\": [\n    {\n      \"name\": \"foo\",\n      \"value\": 123 } ],\n  \"b\": {\n    \"x\": [ 1, 2, 3 ],\n    \"y\": {\n      \"z\": 10 },\n    \"w\": {\n      \"a\": {\n        \"b\": {\n          \"c\": 456,\n          \"d\": 789,\n          \"e\": \"hello world\",\n          \"f\": {\n            \"g\": true,\n            \"p\": [\n              1,\n              {\n                \"q\": 2,\n                \"v\": \"bar\" },\n              3 ] } } } } },\n  \"c\": [\n    {\n      \"a\": {\n        \"b\": 111,\n        \"c\": 222 } },\n    1,\n    null,\n    {\n      \"x\": 3 } ],\n  \"d\": \"random\" }\n```\n\n\u003c!-- prettier-ignore --\u003e\n```js\nprettify2(input)\n```\n\n\u003c!-- prettier-ignore --\u003e\n```json\n{ \"a\": [ { \"name\": \"foo\",\n           \"value\": 123 } ],\n  \"b\": { \"x\": [ 1, 2, 3 ],\n         \"y\": { \"z\": 10 },\n         \"w\": { \"a\": { \"b\": { \"c\": 456,\n                              \"d\": 789,\n                              \"e\": \"hello world\",\n                              \"f\": { \"g\": true,\n                                     \"p\": [ 1,\n                                            { \"q\": 2,\n                                              \"v\": \"bar\" },\n                                            3 ] } } } } },\n  \"c\": [ { \"a\": { \"b\": 111,\n                  \"c\": 222 } },\n         1,\n         null,\n         { \"x\": 3 } ],\n  \"d\": \"random\" }\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flancejpollard%2Fpretty-compact-json.js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flancejpollard%2Fpretty-compact-json.js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flancejpollard%2Fpretty-compact-json.js/lists"}