{"id":18258576,"url":"https://github.com/andrewguenther/jsonf","last_synced_at":"2025-04-04T19:31:45.656Z","repository":{"id":31379023,"uuid":"34942065","full_name":"AndrewGuenther/jsonf","owner":"AndrewGuenther","description":"A Unix-y utility for formatting JSON in a more stream-friendly way","archived":false,"fork":false,"pushed_at":"2015-07-26T03:40:10.000Z","size":888,"stargazers_count":66,"open_issues_count":1,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-20T17:13:17.280Z","etag":null,"topics":["command-line","json","unix"],"latest_commit_sha":null,"homepage":"http://ajguenther.com/jsonf/","language":"Go","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/AndrewGuenther.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":"2015-05-02T09:21:00.000Z","updated_at":"2023-12-06T15:53:46.000Z","dependencies_parsed_at":"2022-08-17T18:55:14.639Z","dependency_job_id":null,"html_url":"https://github.com/AndrewGuenther/jsonf","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndrewGuenther%2Fjsonf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndrewGuenther%2Fjsonf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndrewGuenther%2Fjsonf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndrewGuenther%2Fjsonf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AndrewGuenther","download_url":"https://codeload.github.com/AndrewGuenther/jsonf/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247237679,"owners_count":20906329,"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":["command-line","json","unix"],"created_at":"2024-11-05T10:32:46.701Z","updated_at":"2025-04-04T19:31:40.649Z","avatar_url":"https://github.com/AndrewGuenther.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# jsonf\nA Unix-y utility for formatting JSON in a more stream-friendly way.\n\n# Usage\n\n`jsonf` reads from `stdin` and writes to `stdout` by default.\n\n```bash\n$ jsonf --help\nUsage of jsonf:\n  -a=\"[]\": The runes used to wrap output array indexes.\n  -i=\"\": The input file. Defaults to stdin.\n  -k=\"{}\": The runes used to wrap output keys.\n  -keys=false: If true, keys are printed on their own line.\n  -o=\"\": The output file. Defaults to stdout.\n  -s=\"\\\"\\\"\": The runes used to wrap output strings.\n  -sep=\"\u003e\": String used to seperate keys.\n```\n\n```bash\n$ jsonf --keys\n{\"colors\": [\"red\", \"blue\", \"green\"], \"numbers\": [1, 2, 3], \"active\": true}\n\u003e{active}\n\u003e{active}\u003etrue\n\u003e{colors}\n\u003e{colors}\u003e[]\n\u003e{colors}\u003e[0]\u003e\"red\"\n\u003e{colors}\u003e[1]\u003e\"blue\"\n\u003e{colors}\u003e[2]\u003e\"green\"\n\u003e{numbers}\n\u003e{numbers}\u003e[]\n\u003e{numbers}\u003e[0]\u003e1\n\u003e{numbers}\u003e[1]\u003e2\n\u003e{numbers}\u003e[2]\u003e3\n```\n\n# Examples\n\n### Get information about the most recent commit on this repository\n\n```bash\n$ curl -s 'https://api.github.com/repos/andrewguenther/jsonf/commits' |\n  jsonf |\n  grep -a \"\\[0\\].*{commit}\u003e{committer}\u003e.*\u003e\" |\n  cut -d \"\u003e\" -f 5,6\n{name}\u003e\"Andrew Guenther\"\n{email}\u003e\"guenther.andrew.j@gmail.com\"\n{date}\u003e\"2015-05-02T09:24:43Z\"\n```\n\n### Get all the front page links on Reddit\n\n```bash\n$ curl -s 'https://www.reddit.com/.json' |\n  jsonf |\n  grep '\u003e{data}\u003e{children}\u003e\\[.\\+\\]\u003e{data}\u003e{url}\u003e' |\n  cut -d '\u003e' -f 7\n\"https://i.imgur.com/qH91IEl.gifv\"\n\"http://imgur.com/MUXn9fD\"\n\"http://www.mnn.com//earth-matters/wilderness-resources/stories/more-trees-than-there-were-100-years-ago-its-true\"\n\"http://imgur.com/mjbuXpA\"\n\"http://i.imgur.com/XJ2SG5J.jpg\"\n\"http://imgur.com/tvUSaLZ\"\n\"http://www.reddit.com/r/science/comments/34kxuh/do_you_have_a_college_degree_or_higher_in_science/\"\n\"http://imgur.com/qOPPuzb\"\n\"http://www.reuters.com/article/2015/04/30/us-usa-police-apps-idUSKBN0NL2SK20150430\"\n\"https://m.youtube.com/watch?v=pNHpDG9dZq0\"\n\"http://www.thefix.com/content/ecuador-considers-decriminalizing-all-illegal-drug-use\"\n\"http://i.imgur.com/9x6acUY.jpg\"\n\"http://www.hollywoodreporter.com/news/adam-sandlers-ridiculous-six-makeup-792582\"\n\"http://www.reddit.com/r/AskReddit/comments/34kkcs/pregnant_people_of_reddit_whats_the_rudestmost/\"\n\"http://imgur.com/5Q1RzVV\"\n\"http://www.reddit.com/r/Jokes/comments/34kihw/how_many_reddit_mods_does_it_take_to_change_a/\"\n\"http://imgur.com/a/8aFdi\"\n\"http://www.cbsnews.com/news/woman-texted-driving-drunk-woo-just-before-fatal-crash/\"\n\"http://imgur.com/a/Rzrk9\"\n\"http://www.reddit.com/r/Showerthoughts/comments/34j0r7/that_google_chrome_what_tab_is_being_noisy/\"\n\"http://i.imgur.com/vuBumaG.jpg\"\n\"http://www.reddit.com/r/WritingPrompts/comments/34j4ph/wp_elon_musk_is_actually_a_stranded_alien_who/\"\n\"http://www.reddit.com/r/IAmA/comments/34k027/i_am_noel_gallagher_amaa/\"\n\"http://imgur.com/O4hkbVt\"\n\"http://imgur.com/a/lDn0S\"\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandrewguenther%2Fjsonf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandrewguenther%2Fjsonf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandrewguenther%2Fjsonf/lists"}