--- id: gron version: "1.4.0" license: MIT License Copyright (c) 2018 Bastian Venthur Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to… (full text in the JSON record) license_treatment: permissive maintenance: dormant --- # gron — Python library to grep JSON. License: permissive · Maintenance: dormant · Downloads: 514.1K/mo ## What it is and what it does Gron is a Python implementation of the original gron tool that converts JSON into a line-oriented, grep-friendly format. Each line represents one value assignment with its complete path, making it straightforward to search, filter, and analyze JSON data using standard Unix tools like grep, awk, and sed. The tool reads JSON from a file or stdin and outputs each field and value as a separate line in the form `json.path.to.field = value;`, with array indices shown as `[n]`. This transformation makes JSON data searchable without needing specialized JSON query tools, and the output can be piped back through gron's reverse function to reconstruct the original JSON. It requires Python 3.10 or later and has no external runtime dependencies. Use it for: - Search for specific keys or values in large JSON files using grep patterns. - Extract particular fields from complex nested JSON structures via command-line filters. - Debug API responses by viewing JSON in a line-by-line format that's easier to scan. - Combine JSON queries with Unix text processing tools (grep, awk, sed) in shell pipelines. - Convert JSON to a format suitable for version control diffs or line-based analysis. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Transforms JSON into grep-able line-by-line output, where each line represents a single value assignment with its full path, making it easier to search and filter JSON data. Yes, if you work with JSON on the command line and want to leverage Unix text tools for searching and filtering. The package is stable, has no dependencies, and installs easily. The dormant maintenance status is not a concern for a mature, single-purpose tool with no external dependencies, but verify that the feature set meets your needs—it is primarily a CLI tool, not a general-purpose JSON library. ## Install pip install gron uv add gron poetry add gron ## Installing gron Before you install: Low friction install with no runtime dependencies. Maintenance is dormant (last commit 2024-11-25, no activity for 720 days), but the package is marked Production/Stable and has received a recent release. License in practice: MIT License permits unrestricted use, modification, and distribution with only attribution and liability disclaimer required—no restrictions on commercial or private use. Quickstart: pip install gron # Command-line usage: gron input.json # Or pipe JSON to stdin: cat data.json | gron Requires Python 3.10 or later. Verify before relying: - Whether the package provides a Python API for programmatic use or is primarily a CLI tool. - Performance characteristics when handling large JSON files. - Exact feature parity with the original Go implementation of gron. ## Package facts - License: MIT License Copyright (c) 2018 Bastian Venthur Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to… (full text in the JSON record) (permissive) - Python support: supports_current - Install friction: low - Maintenance: dormant - Downloads: 514.1K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags grep json, json line by line, json search tool, json to text format, flatten json for grep, json query command line, json path extraction, json-cli, text-processing [View on SkillFed](https://skillfed.io/packages/gron) · [View on PyPI](https://pypi.org/project/gron/)