{"id":19078226,"url":"https://github.com/mazen160/gronpy","last_synced_at":"2025-04-30T04:41:44.045Z","repository":{"id":99119518,"uuid":"194903876","full_name":"mazen160/gronpy","owner":"mazen160","description":"Print JSON objects in a \"Greppable\" output.","archived":false,"fork":false,"pushed_at":"2019-07-02T17:05:53.000Z","size":4,"stargazers_count":3,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-30T04:41:41.394Z","etag":null,"topics":["grep","json"],"latest_commit_sha":null,"homepage":null,"language":"Python","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/mazen160.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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}},"created_at":"2019-07-02T17:05:27.000Z","updated_at":"2024-08-12T19:50:42.000Z","dependencies_parsed_at":"2023-03-13T15:52:05.102Z","dependency_job_id":null,"html_url":"https://github.com/mazen160/gronpy","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mazen160%2Fgronpy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mazen160%2Fgronpy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mazen160%2Fgronpy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mazen160%2Fgronpy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mazen160","download_url":"https://codeload.github.com/mazen160/gronpy/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251644826,"owners_count":21620630,"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":["grep","json"],"created_at":"2024-11-09T02:07:23.372Z","updated_at":"2025-04-30T04:41:44.038Z","avatar_url":"https://github.com/mazen160.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gron.py\r\n\r\n### Print JSON objects in a \"Greppable\" output.\r\n\r\n\r\n# About The Project\r\n\r\n\r\nThis tool traverses a JSON object into a Greppable output. It's inspired by the original [Gron](https://github.com/tomnomnom/gron) tool written in Go-lang.\r\n\r\nThe algorithm I wrote is a depth-first tree traversing algorithm for traversing the JSON object. It’s done by recursively serializing the JSON object in order to complete the traversing process.\r\n\r\n\r\n## Usage\r\n```bash\r\n$ cat test.json\r\n{\r\n    \"glossary\": {\r\n        \"title\": \"example glossary\",\r\n\t\t\"GlossDiv\": {\r\n            \"title\": \"S\",\r\n\t\t\t\"GlossList\": {\r\n                \"GlossEntry\": {\r\n                    \"ID\": \"SGML\",\r\n\t\t\t\t\t\"SortAs\": \"SGML\",\r\n\t\t\t\t\t\"GlossTerm\": \"Standard Generalized Markup Language\",\r\n\t\t\t\t\t\"Acronym\": \"SGML\",\r\n\t\t\t\t\t\"Abbrev\": \"ISO 8879:1986\",\r\n\t\t\t\t\t\"GlossDef\": {\r\n                        \"para\": \"A meta-markup language, used to create markup languages such as DocBook.\",\r\n\t\t\t\t\t\t\"GlossSeeAlso\": [\"GML\", \"XML\"]\r\n                    },\r\n\t\t\t\t\t\"GlossSee\": \"markup\"\r\n                }\r\n            }\r\n        }\r\n    }\r\n}\r\n\r\n$ gron test.json\r\n[glossary][GlossDiv][GlossList][GlossEntry][GlossDef][GlossSeeAlso][0]-\u003eGML\r\n[glossary][GlossDiv][GlossList][GlossEntry][GlossDef][GlossSeeAlso][1]-\u003eXML\r\n[glossary][GlossDiv][GlossList][GlossEntry][GlossDef][para]-\u003eA meta-markup language, used to create markup languages such as DocBook.\r\n[glossary][GlossDiv][GlossList][GlossEntry][GlossSee]-\u003emarkup\r\n[glossary][GlossDiv][GlossList][GlossEntry][Acronym]-\u003eSGML\r\n[glossary][GlossDiv][GlossList][GlossEntry][GlossTerm]-\u003eStandard Generalized Markup Language\r\n[glossary][GlossDiv][GlossList][GlossEntry][Abbrev]-\u003eISO 8879:1986\r\n[glossary][GlossDiv][GlossList][GlossEntry][SortAs]-\u003eSGML\r\n[glossary][GlossDiv][GlossList][GlossEntry][ID]-\u003eSGML\r\n[glossary][GlossDiv][title]-\u003eS\r\n[glossary][title]-\u003eexample glossary\r\n\r\n$ # You can pipline input to gron too.\r\n\r\n$ cat test.json | gron\r\n[glossary][GlossDiv][GlossList][GlossEntry][GlossDef][GlossSeeAlso][0]-\u003eGML\r\n[glossary][GlossDiv][GlossList][GlossEntry][GlossDef][GlossSeeAlso][1]-\u003eXML\r\n[glossary][GlossDiv][GlossList][GlossEntry][GlossDef][para]-\u003eA meta-markup language, used to create markup languages such as DocBook.\r\n[glossary][GlossDiv][GlossList][GlossEntry][GlossSee]-\u003emarkup\r\n[glossary][GlossDiv][GlossList][GlossEntry][Acronym]-\u003eSGML\r\n[glossary][GlossDiv][GlossList][GlossEntry][GlossTerm]-\u003eStandard Generalized Markup Language\r\n[glossary][GlossDiv][GlossList][GlossEntry][Abbrev]-\u003eISO 8879:1986\r\n[glossary][GlossDiv][GlossList][GlossEntry][SortAs]-\u003eSGML\r\n[glossary][GlossDiv][GlossList][GlossEntry][ID]-\u003eSGML\r\n[glossary][GlossDiv][title]-\u003eS\r\n[glossary][title]-\u003eexample glossary\r\n\r\n$ cat test.json | gron | grep language\r\n[glossary][GlossDiv][GlossList][GlossEntry][GlossDef][para]-\u003eA meta-markup language, used to create markup languages such as DocBook.\r\n\r\n$ curl -s https://api.ipify.org?format=json | gron\r\n[ip]-\u003e1.1.1.1\r\n```\r\n\r\n## Demo\r\n\r\n[![asciicast](https://asciinema.org/a/254783.svg)](https://asciinema.org/a/254783)\r\n\r\n\r\n### Installation\r\n\r\n#### One-line installer\r\n\r\n```bash\r\npip install git+https://github.com/mazen160/gronpy\r\n```\r\n\r\n#### Manual Installation\r\n```\r\n$ git clone https://github.com/mazen160/gronpy\r\n\r\n$ cd gronpy \u0026\u0026 python3 setup.py install\r\n```\r\n\r\n\r\n# Requirements\r\n* Python2 or Python3\r\n\r\n## License\r\nThe project is currently licensed under MIT License.\r\n\r\n# Legal Disclaimer\r\nThis project is made for educational and ethical testing purposes only. It is the end user's responsibility to obey all applicable local, state and federal laws. Developers assume no liability and are not responsible for any misuse or damage caused by this program.\r\n\r\n\r\n# Author #\r\n## *Mazin Ahmed* ##\r\n* Website: [https://mazinahmed.net](https://mazinahmed.net)\r\n* Email: *mazin [at] mazinahmed [dot] net*\r\n* Twitter: [https://twitter.com/mazen160](https://twitter.com/mazen160)\r\n* Linkedin: [http://linkedin.com/in/infosecmazinahmed](http://linkedin.com/in/infosecmazinahmed)\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmazen160%2Fgronpy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmazen160%2Fgronpy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmazen160%2Fgronpy/lists"}