{"id":21345,"library":"flake8-json","title":"flake8-json","description":"Flake8 plugin that formats linting results as JSON. Currently at version 24.4.0, compatible with Python >=3.6. Part of the PyCQA ecosystem. Updates follow Flake8 releases.","status":"active","version":"24.4.0","language":"python","source_language":"en","source_url":"https://github.com/pycqa/flake8-json","tags":["flake8","plugin","json","linter","reporter"],"install":[{"cmd":"pip install flake8-json","lang":"bash","label":"Install via pip"}],"dependencies":[{"reason":"Required runtime dependency; flake8-json is a plugin for Flake8.","package":"flake8","optional":false}],"imports":[{"note":"Do not import from 'flake8_json_formatter' or 'flake8_json.Flake8JSONFormatter' if using older versions; the module is 'flake8_json'.","symbol":"Flake8JSONFormatter","correct":"from flake8_json import Flake8JSONFormatter"}],"quickstart":{"code":"import subprocess\nresult = subprocess.run(['flake8', '--format', 'json', 'myfile.py'], capture_output=True, text=True)\nprint(result.stdout)","lang":"python","description":"Run flake8 with JSON output format on a file."},"warnings":[{"fix":"Run flake8 with --format json (or configure in setup.cfg).","message":"flake8-json is a formatting reporter; it does not add new lint checks. To get JSON output, use the --format json flag when invoking flake8.","severity":"gotcha","affected_versions":"all"},{"fix":"Upgrade to 24.4.0 and adjust parsing if needed.","message":"Versions prior to 24.4.0 may have different behavior for nested violations. Always check the output schema if upgrading from an older version.","severity":"breaking","affected_versions":"<24.4.0"},{"fix":"Use 'from flake8_json import ...' instead of 'from flake8-json import ...'.","message":"Using 'flake8-json' as a package name (hyphen) is deprecated; import using underscore: 'flake8_json'.","severity":"deprecated","affected_versions":">=24.4.0"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Install with 'pip install flake8-json' and import as 'import flake8_json' (underscore).","cause":"The package 'flake8-json' is not installed or imported incorrectly (hyphen vs underscore).","error":"ModuleNotFoundError: No module named 'flake8_json'"},{"fix":"Run flake8 with --format json. Verify plugin is installed: 'pip list | grep flake8-json'.","cause":"The --format flag was not set to 'json' or the plugin is not registered.","error":"Flake8 reported no JSON output"},{"fix":"Upgrade flake8 to >=3.0.0. flake8-json requires flake8 >=3.0.0.","cause":"Flake8 version is too old to support the --format flag.","error":"Error: 'format' is not a recognized option"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}