{"id":13652191,"url":"https://github.com/pantuza/jsoncat","last_synced_at":"2026-01-16T12:11:23.841Z","repository":{"id":141529286,"uuid":"42481968","full_name":"pantuza/jsoncat","owner":"pantuza","description":"Json pretty-print parser based on a recursive lexical analyser ","archived":false,"fork":false,"pushed_at":"2020-10-05T13:59:48.000Z","size":1136,"stargazers_count":27,"open_issues_count":3,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-04-14T09:08:47.612Z","etag":null,"topics":["c","clang","cli","json","jsoncat","parser","pretty-print"],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pantuza.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}},"created_at":"2015-09-14T23:03:22.000Z","updated_at":"2023-09-20T13:44:23.000Z","dependencies_parsed_at":"2024-01-03T05:42:07.197Z","dependency_job_id":"6e2bd80a-b99f-4d0b-9ffa-875ec3ce4307","html_url":"https://github.com/pantuza/jsoncat","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pantuza%2Fjsoncat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pantuza%2Fjsoncat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pantuza%2Fjsoncat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pantuza%2Fjsoncat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pantuza","download_url":"https://codeload.github.com/pantuza/jsoncat/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250365214,"owners_count":21418649,"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":["c","clang","cli","json","jsoncat","parser","pretty-print"],"created_at":"2024-08-02T02:00:56.848Z","updated_at":"2026-01-16T12:11:23.830Z","avatar_url":"https://github.com/pantuza.png","language":"C","funding_links":[],"categories":["Command-line tools"],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/pantuza/jsoncat.svg?branch=master)](https://travis-ci.org/pantuza/jsoncat)\n\nJsoncat\n=======\n\n![jsoncat_logo](https://raw.githubusercontent.com/pantuza/jsoncat/master/img/jsoncat_logo.png \"Jsoncat logo\")\n\n### Description\nJson pretty-print parser based on a recursive lexical analyser. \nThe parser was based on the specification defined at [json.org](http://json.org).\nThe input file is parsed to build a json object.\nIf the object is correct, it will be pretty-printed to standard output.\n\n\u003e Check out the [blog post](https://blog.pantuza.com/tutoriais/jsoncat-formatacao-json-no-terminal) about jsoncat [pt-BR]\n\n### Usage\nJsoncat parses a json that comes from a pipe to stdin. For example, parsing a request:\n```bash\n$\u003e curl -s https://pantuza.com/sample.json --insecure | jsoncat\n```\n```javascript\n{\n        'what': \"A json example file\",\n        'test': true,\n        'values': [ 42, 10, 5.32],\n        'data': {\n                'name': 'Test Name',\n                'type': null\n        }\n}\n```\n\nOr simple by passing a path to a json file as follows:\n```bash\n$\u003e jsoncat tests/samples/input_06.json\n```\n```javascript\n{\n        'age': 42,\n        'name': 'marvin',\n        'what': 'robot'\n}\n```\n\nOr yet, again from stdin, by echoing a json:\n```bash\n$\u003e echo \"{'test': true}\" | jsoncat\n```\n```javascript\n{\n        'test': true\n}\n```\n\n### Installation\n\n###### From Homebrew for Mac OS\nIn a terminal install jsoncat from tap source:\n```bash\n$\u003e brew tap pantuza/homebrew-jsoncat\n$\u003e brew install jsoncat\n```\n\n###### From source\nClone this repository, go to project directory and run:\n```bash\n$\u003e make\n$\u003e make install\n```\n\u003e **PS:** I'm creating the RPM and DEB packages. A soon as possible you would install jsoncat\n\u003e from these sources.\n\n### Options\n        \n**-v | --version**\n\u003e Prints jsoncat version\n\n**-h | --help**\n\u003e Prints help message\n\n**--no-color**\n\u003e Removes the color characters. This characters are useful only for the terminal that will pretty print the Json.\n\u003e If you want to store the resulted Json to a file, use this option to persist a valid Json.\n\n**--tab-stop**\n\u003e Sets the tab stop used by Jsoncat. We never insert tab character. Instead, we expand tab with spaces. \n\u003e For that, the --tab-stop configures the number of spaces used for Json indentation. The default value\n\u003e is 4.\n\n### Contributing\n\nWe are welcome to contributions. Just do a fork, modify some code and make a \npull request. You may not forget to describe your modifications very well.\nIt will help us on the code review. Try to write some tests, it would be\nnice.\n\n### Coding style\n\nwe are not stringent with it, but we like the \n[GNU C coding \nstyle](https://www.gnu.org/prep/standards/html_node/Writing-C.html).\n\n### Testing\n\nOur test scripts are testing only the binary execution and checking for some\nerror during the parsing and at the result. \nWe use bash scripts to do this task. \n\nAt the tests directory, there is a utils.sh file that defines the tests functions.\nEach other file in this directory uses the utils functions to run tests over \nstrings, numbers, objects, arrays and constants. Also, there is a script to test\nthe command line options. The samples directory has a lot of json sample files\nto use during development tests.\n\nFor now, we are not using any tool for testing :/. If you have suggestions \nfor it, please put it in an issue, we will certain check it out. \n\n\n### Author\n\n###### Written by [Gustavo Pantuza](https://pantuza.com)\n\n### Reporting Bugs\n\n###### Report Jsoncat bugs to gustavopantuza@gmail.com\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpantuza%2Fjsoncat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpantuza%2Fjsoncat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpantuza%2Fjsoncat/lists"}