{"id":27768052,"url":"https://github.com/koddr/json2csv","last_synced_at":"2025-10-16T12:32:56.008Z","repository":{"id":158723459,"uuid":"634193349","full_name":"koddr/json2csv","owner":"koddr","description":"🚴 The parser can read given folder with JSON files, filtering and qualifying input data with intent \u0026 stop words dictionaries and save results to CSV files by given chunk size.","archived":false,"fork":false,"pushed_at":"2023-08-15T08:48:07.000Z","size":65,"stargazers_count":10,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-29T19:59:29.675Z","etag":null,"topics":["csv","go","golang","json","json-to-csv","json-to-excel","parse","parser","parser-library","parsers"],"latest_commit_sha":null,"homepage":"https://github.com/koddr/json2csv/wiki","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/koddr.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,"dei":null},"funding":{"liberapay":"koddr"}},"created_at":"2023-04-29T10:47:26.000Z","updated_at":"2024-04-22T04:21:59.000Z","dependencies_parsed_at":"2024-01-30T07:03:03.861Z","dependency_job_id":"9c44de62-4a92-4c7a-99fb-33ec4d271a26","html_url":"https://github.com/koddr/json2csv","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/koddr%2Fjson2csv","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/koddr%2Fjson2csv/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/koddr%2Fjson2csv/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/koddr%2Fjson2csv/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/koddr","download_url":"https://codeload.github.com/koddr/json2csv/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251574671,"owners_count":21611387,"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":["csv","go","golang","json","json-to-csv","json-to-excel","parse","parser","parser-library","parsers"],"created_at":"2025-04-29T19:59:35.300Z","updated_at":"2025-10-16T12:32:50.966Z","avatar_url":"https://github.com/koddr.png","language":"Go","readme":"# json2csv – Parse JSON files to CSV with data qualifier\n\n[![Go version][go_version_img]][go_dev_url]\n[![Go report][go_report_img]][go_report_url]\n[![Wiki][wiki_img]][wiki_url]\n[![License][license_img]][license_url]\n\nThe parser can read given folder with `*.json` files, filtering and\nqualifying input data with intent \u0026 stop words dictionaries and save results\nto CSV files by given chunk size.\n\n**Minimal** dependency on other Go packages, but **maximum** performance\neven on large amounts of the input JSON data.\n\n## ⚡️ Quick start\n\nFirst, [download][go_download] and install **Go**. Version `1.20` (or higher)\nis required.\n\nInstallation is done by using the [`go install`][go_install] command:\n\n```console\ngo install github.com/koddr/json2csv@latest\n```\n\n\u003e 💡 Note: See the repository's [Release page][repo_release_url], if you want\n\u003e to download a ready-made `deb`, `rpm`, `apk` or `Arch Linux` package.\n\nGNU/Linux and macOS users available way to install via [Homebrew][brew_url]:\n\n```console\n# Tap a new formula:\nbrew tap koddr/tap\n\n# Installation:\nbrew install koddr/tap/json2csv\n```\n\nPrepare folder with your data input in the `*.json` format, create JSON files\nwith intents and filter.\n\n\u003e 💡 Note: See the repository's [Wiki page][wiki_url] to understand\n\u003e structures of JSON files and get general recommendations for preparing the\n\u003e input data.\n\nNext, run `json2csv` parser with options:\n\n```console\njson2csv \\\n  -json    /path/to/input/json/folder \\\n  -intents /path/to/intents-file.json \\\n  -filter  /path/to/filter-file.json \\\n  -output  /path/to/output/csv/folder \\\n  -content-field message \\\n  -min-word-len  5 \\\n  -chunk 1000\n```\n\nDone! 🎉 Output CSV file(s) has a default comma (`,`) separators between columns.\n\n### 🐳 Docker-way to quick start\n\nIf you don't want to physically install `json2csv` to your system, you feel\nfree to using our [official Docker image][docker_image_url] and run it from\nisolated container:\n\n```console\ndocker run --rm -it -v ${PWD}:${PWD} -w ${PWD} koddr/json2csv:latest [OPTIONS]\n```\n\n## 🧩 Options\n\n| Option | Description | Is required? | Default value | Docs link |\n| --- | --- | --- | --- | --- |\n| `-json` | set a **path** to the folder with JSON source file(s) | no | `./json_files` | [Wiki][wiki_json_folder_url] |\n| `-intents` | set a **path** to the file with intents | no | `./intents.json` | [Wiki][wiki_intents_url] |\n| `-filter` | set a **path** to the file with a filter | no | `./filter.json` | [Wiki][wiki_filter_url] |\n| `-output` | set a **path** to the output folder where the prepared CSV file(s) will be placed | no | `./output_files` | [Wiki][wiki_output_folder_url] |\n| `-content-field` | set a **name of the content field** (attribute that contains string to qualify and filter) in JSON source file(s) | no | `content` | |\n| `-min-word-len` | set a **min word length count** to filter input words (if a word is smaller than this option, it will be skipped) | no | `0` | |\n| `-chunk` | set a **chunk size** for one CSV file | no | `5000` | |\n\n## ✨ Solving case\n\nImagine that you have many JSON files of the same type in a folder on your\ncomputer. The structure of each such file is identical and can be described\nin a single Go structure.\n\nBut your task is not only to turn these files into a structured CSV, but\nalso to make some qualification of incoming data based on dictionaries with\nintent.\n\nThe output should be CSV files (with a specified number of lines in each),\nwhere the first column contains the original phrases from JSON files, and\nthe second column will contain the associated intents after qualification.\n\nThis is what this Go package solves! ✌️\n\n\u003e ⚡️ More details about the case I solved are [here](https://github.com/koddr/json2csv/issues/4#issuecomment-1678605835).\n\n## ⚠️ License\n\n[`json2csv`][repo_url] is free and open-source software licensed under the\n[Apache 2.0 License][license_url], created and supported with 🩵 for people and\nrobots by [Vic Shóstak][author].\n\n[go_download]: https://golang.org/dl/\n[go_install]: https://golang.org/cmd/go/#hdr-Compile_and_install_packages_and_dependencies\n[go_version_img]: https://img.shields.io/badge/Go-1.20+-00ADD8?style=for-the-badge\u0026logo=go\n[go_report_img]: https://img.shields.io/badge/Go_report-A+-success?style=for-the-badge\u0026logo=none\n[go_report_url]: https://goreportcard.com/report/github.com/koddr/json2csv\n[go_dev_url]: https://pkg.go.dev/github.com/koddr/json2csv\n[code_coverage_img]: https://img.shields.io/badge/code_coverage-0%25-success?style=for-the-badge\u0026logo=none\n[brew_url]: https://brew.sh\n[docker_image_url]: https://hub.docker.com/repository/docker/koddr/json2csv\n[wiki_img]: https://img.shields.io/badge/docs-wiki_page-blue?style=for-the-badge\u0026logo=none\n[wiki_url]: https://github.com/koddr/json2csv/wiki\n[wiki_intents_url]: https://github.com/koddr/json2csv/wiki#intents\n[wiki_filter_url]: https://github.com/koddr/json2csv/wiki#filter\n[wiki_json_folder_url]: https://github.com/koddr/json2csv/wiki#folder-with-json-files\n[wiki_output_folder_url]: https://github.com/koddr/json2csv/wiki#folder-with-output-csv-files\n[license_img]: https://img.shields.io/badge/license-Apache_2.0-red?style=for-the-badge\u0026logo=none\n[license_url]: https://github.com/koddr/json2csv/blob/main/LICENSE\n[repo_url]: https://github.com/koddr/json2csv\n[repo_release_url]: https://github.com/koddr/json2csv/releases\n[author]: https://github.com/koddr\n","funding_links":["https://liberapay.com/koddr"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkoddr%2Fjson2csv","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkoddr%2Fjson2csv","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkoddr%2Fjson2csv/lists"}