{"id":21675875,"url":"https://github.com/sumithemmadi/json-to-plain-text","last_synced_at":"2026-03-02T06:01:46.751Z","repository":{"id":69943855,"uuid":"545266304","full_name":"sumithemmadi/json-to-plain-text","owner":"sumithemmadi","description":"json-to-plain-text is a lightweight npm package that converts JSON into a clean, human-readable plain-text.","archived":false,"fork":false,"pushed_at":"2025-08-26T12:35:19.000Z","size":218,"stargazers_count":20,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-09-30T19:16:19.716Z","etag":null,"topics":["cli","debugging","format","formatter","human-readable","javascript","json","json-to-plain-text","json-to-text","json-to-txt","logger","nodejs","parse","plain-text","pretty-print","test-format","text","typescript"],"latest_commit_sha":null,"homepage":"http://json-to-plain-text.js.org/","language":"TypeScript","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/sumithemmadi.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"sumithemmadi","patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"otechie":null,"custom":["https://paypal.me/sumithemmadi"]}},"created_at":"2022-10-04T04:09:25.000Z","updated_at":"2025-09-26T10:50:13.000Z","dependencies_parsed_at":"2024-01-21T04:25:26.342Z","dependency_job_id":"4f49d284-cb5c-4f8c-88a1-3cb7e1d6a049","html_url":"https://github.com/sumithemmadi/json-to-plain-text","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/sumithemmadi/json-to-plain-text","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sumithemmadi%2Fjson-to-plain-text","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sumithemmadi%2Fjson-to-plain-text/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sumithemmadi%2Fjson-to-plain-text/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sumithemmadi%2Fjson-to-plain-text/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sumithemmadi","download_url":"https://codeload.github.com/sumithemmadi/json-to-plain-text/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sumithemmadi%2Fjson-to-plain-text/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29993539,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-02T01:47:34.672Z","status":"online","status_checked_at":"2026-03-02T02:00:07.342Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["cli","debugging","format","formatter","human-readable","javascript","json","json-to-plain-text","json-to-text","json-to-txt","logger","nodejs","parse","plain-text","pretty-print","test-format","text","typescript"],"created_at":"2024-11-25T14:11:18.930Z","updated_at":"2026-03-02T06:01:46.745Z","avatar_url":"https://github.com/sumithemmadi.png","language":"TypeScript","readme":"# json-to-plain-text\n\n[![Version](https://img.shields.io/npm/v/json-to-plain-text.svg)](https://www.npmjs.com/package/json-to-plain-text)\n[![Stars](https://img.shields.io/github/stars/sumithemmadi/json-to-plain-text)](https://github.com/sumithemmadi/json-to-plain-text/stargazers)\n[![Downloads](https://img.shields.io/npm/dt/json-to-plain-text.svg)](https://www.npmjs.com/package/json-to-plain-text)\n[![License](https://img.shields.io/npm/l/json-to-plain-text.svg)](LICENSE)\n[![Maintenance](https://img.shields.io/npms-io/maintenance-score/json-to-plain-text)](https://github.com/sumithemmadi/json-to-plain-text)\n[![Issues](https://img.shields.io/github/issues/sumithemmadi/json-to-plain-text)](https://github.com/sumithemmadi/json-to-plain-text/issues)\n[![GitHub Sponsors](https://img.shields.io/github/sponsors/sumithemmadi)](https://github.com/sponsors/sumithemmadi)\n[![Install size](https://img.shields.io/badge/dynamic/json?url=https://packagephobia.com/v2/api.json?p=json-to-plain-text\u0026query=$.install.pretty\u0026label=install%20size)](https://packagephobia.com/result?p=json-to-plain-text)\n[![Bundle size](https://img.shields.io/bundlephobia/minzip/json-to-plain-text)](https://bundlephobia.com/package/json-to-plain-text@latest)\n[![Known Vulnerabilities](https://snyk.io/test/npm/json-to-plain-text/badge.svg)](https://snyk.io/test/npm/json-to-plain-text)\n\n---\n\n## 📖 Overview  \n\n`json-to-plain-text` is a lightweight npm package that converts **JSON** into a clean, human-readable **plain-text**.  \n\nThink of it as `JSON.stringify()`, but prettier, friendlier, and tailored for **logs, debugging, and CLI output**.\n\n\u003e [!NOTE]  \n\u003e From version **2.0.0+**, this package outputs plain text only.  \n\u003e If you need **colored output**, please use [version 1.1.4](https://www.npmjs.com/package/json-to-plain-text/v/1.1.4) .  \n\n---\n\n## ✨ Features  \n\n- 🔹 Convert JSON objects into easy-to-read plain text  \n- ⚡ Tiny \u0026 fast (zero dependencies)  \n- 🛠 Configurable separators, spacing, quotes, and array formatting  \n- ✅ Great for **logs, debugging, reports, and CLI tools**  \n\n---\n\n## 🔍 Why use this?  \n\nUse `json-to-plain-text` when you need:  \n- 📑 **Readable logs** – no more squinting at raw JSON  \n- 🖥 **CLI outputs** – format objects neatly for the terminal  \n- 🧪 **Debugging helpers** – quickly inspect nested objects  \n- 📝 **Reports/configs** – human-friendly data printing  \n\n---\n\n## 🚀 Installation  \n\n```bash\nnpm install json-to-plain-text\n```\n\n---\n\n## 📦 Usage  \n\n```js\nimport { jsonToPlainText } from \"json-to-plain-text\";\n```\n\n---\n\n## ⚙️ API  \n\n```ts\njsonToPlainText(data: unknown, options?: Options): string\n```\n\n### Parameters  \n\n- **`data`** *(required)* – JSON-like input or JavaScript object.  \n- **`options`** *(optional)* – Customize the formatting.  \n\n| Option                   | Type    | Default | Description |\n|---------------------------|---------|---------|-------------|\n| `separator`              | string  | `:`     | Character used between keys and values. |\n| `spacing`                | boolean | `true`  | Align keys with spacing before colons. |\n| `squareBracketsForArray` | boolean | `false` | Display arrays inside `[]`. |\n| `doubleQuotesForKeys`    | boolean | `false` | Wrap object keys in double quotes. |\n| `doubleQuotesForValues`  | boolean | `false` | Wrap string values in double quotes. |\n\n---\n\n## 💡 Example  \n\n```ts\nimport { jsonToPlainText, Options } from \"json-to-plain-text\";\n\nconst data = {\n  place_id: \"173937105\",\n  osm_type: \"way\",\n  lat: \"17.861533866867224\",\n  lon: \"78.8081441896764\",\n  address: {\n    city: \"Hyderabad\",\n    state: \"Telangana\",\n    country: \"India\",\n  },\n  distance: 2,\n};\n\nconst options: Options = {\n  separator: \":\",\n  spacing: true,\n  squareBracketsForArray: false,\n  doubleQuotesForKeys: false,\n  doubleQuotesForValues: false,\n};\n\nconsole.log(jsonToPlainText(data, options));\n```\n\n### ✅ Output  \n\n```yaml\nplace_id : 173937105\nosm_type : way\nlat      : 17.861533866867224\nlon      : 78.8081441896764\naddress  : \ncity     : Hyderabad\nstate    : Telangana\ncountry  : India\ndistance : 2\n```\n\n---\n\n## 💝 Support  \n\nIf this project helps you, consider supporting my open-source work:  \n\n- [💖 SPONSOR ME ON GITHUB](https://github.com/sponsors/sumithemmadi?o=sd\u0026sc=t)  \n\nA huge thanks to all sponsors for supporting my work!  \n\n---\n\n## 📜 License  \n\nThis project is licensed under the [MIT License](LICENSE).  \n\n---\n\n## 👨‍💻 Author  \n\n- [Sumith Emmadi](https://github.com/sumithemmadi)  \n","funding_links":["https://github.com/sponsors/sumithemmadi","https://paypal.me/sumithemmadi","https://github.com/sponsors/sumithemmadi?o=sd\u0026sc=t"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsumithemmadi%2Fjson-to-plain-text","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsumithemmadi%2Fjson-to-plain-text","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsumithemmadi%2Fjson-to-plain-text/lists"}