{"id":16882743,"url":"https://github.com/alhadis/ppjson","last_synced_at":"2025-04-11T12:08:16.872Z","repository":{"id":57329214,"uuid":"48746805","full_name":"Alhadis/PPJSON","owner":"Alhadis","description":"Small command-line utility to pretty-print JSON files. Colour included.","archived":false,"fork":false,"pushed_at":"2018-02-25T05:53:46.000Z","size":111,"stargazers_count":6,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-10T03:10:35.918Z","etag":null,"topics":["beautifier","colours","formatter","json","pretty-printer"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/ppjson","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Alhadis.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-12-29T12:35:09.000Z","updated_at":"2025-03-30T19:17:44.000Z","dependencies_parsed_at":"2022-09-01T15:32:33.800Z","dependency_job_id":null,"html_url":"https://github.com/Alhadis/PPJSON","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Alhadis%2FPPJSON","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Alhadis%2FPPJSON/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Alhadis%2FPPJSON/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Alhadis%2FPPJSON/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Alhadis","download_url":"https://codeload.github.com/Alhadis/PPJSON/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248396937,"owners_count":21097018,"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":["beautifier","colours","formatter","json","pretty-printer"],"created_at":"2024-10-13T16:08:33.577Z","updated_at":"2025-04-11T12:08:16.833Z","avatar_url":"https://github.com/Alhadis.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"PPJSON\n=======\n\nSmall command-line utility to pretty-print JSON files. Colour included.\n\n![Screenshot](preview.png)\n\n\nInstallation\n------------\n\n\tnpm -g install ppjson\n\nUsage\n-----\n\nJSON data can be supplied from a file, or piped through standard input:\n\n\tppjson \u003c json.file\n\tppjson json.file\n\tnode spit-json-to-stdout.js | ppjson\n\nRun `man ppjson` to access everything you're reading here.\n\nOptions\n-------\n\n\t-a, --alphabetise               Order properties alphabetically\n\t-c, --colour           [bool]   Colourise the prettified output\n\t-i, --indent           [size=4] Indentation width, expressed in spaces\n\t-m, --mutilate         [bool]   Unquote property identifiers\n\t-p, --paged            [bool]   Show content in pager if longer than screen\n\t-t, --tabs                      Use tabs to indent output instead of spaces\n\t-u, --underline-urls   [bool]   Add underlines to URLs\n\t-v, --version                   Print the program's version string and exit\n\t-w, --write                     Write prettified data back to files\n\n\nThe `[bool]` options above are all enabled by default.\nYou can disable them by passing `0`, `\"false\"`, `\"no\"` or `\"off\"` as values (their capitalisation doesn't matter):\n\n\t# All these lines are equivalent\n\tppjson --mutilate=no\n\tppjson --mutilate OFF\n\tppjson --mutilate 0\n\tppjson  -m0\n\tppjson --mutilate false\n\nOption order is inconsequential: it doesn't matter if they're listed before or after a filename:\n\n\t# Same damn thing:\n\tppjson -m0 file.json\n\tppjson file.json -m0\n\n\nExamples\n--------\n\nUse 2 spaces for indentation instead of 4:\n\n\tppjson --indent=2 file.json\n\nDisable colours:\n\n\tppjson -c0 \u003c file.json\n\nDon't remove quote marks from property names:\n\n\tppjson -m false file.json\n\tppjson --mutilate nah \u003c file.json\n\nYes, I really did include `\"nah\"` as a possible synonym for a false boolean value. Try it.\n\n\nCustomising colours\n-------------------\n\nIf you'd like to change the colours, you can do so with environment variables.\nDrop the following into your `.bash_profile` or shell equivalent:\n\n~~~shell\nexport PPJSON_COLOURS='s=38;5;2:n=38;5;2:t=38;5;6:f=38;5;6:n=38;5;6:p=38;5;8:e=38;5;1;u='\n\n# Older format which uses colour indexes\nexport PPJSON_COLOUR_STRINGS=2\nexport PPJSON_COLOUR_NUMBERS=2\nexport PPJSON_COLOUR_TRUE=6\nexport PPJSON_COLOUR_FALSE=6\nexport PPJSON_COLOUR_NULL=6\nexport PPJSON_COLOUR_PUNCT=8\nexport PPJSON_COLOUR_ERROR=1\n~~~\n\nDefault values are depicted above.\nThe syntax of `PPJSON_COLOURS` is similar to  [`GREP_COLORS`](https://www.gnu.org/software/grep/manual/html_node/Environment-Variables.html).\nEach single-letter field corresponds to a different part of the output that can be styled:\n\n~~~shell\ns  # Strings\nn  # Numbers\nt  # True\nf  # False\nn  # Null\np  # Punctuation (colons and brackets)\ne  # Error highlighting\nu  # Unquoted property keys\n~~~\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falhadis%2Fppjson","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falhadis%2Fppjson","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falhadis%2Fppjson/lists"}