{"id":17749483,"url":"https://github.com/oresoftware/json-stdio","last_synced_at":"2026-04-13T18:02:38.011Z","repository":{"id":57285287,"uuid":"109735910","full_name":"ORESoftware/json-stdio","owner":"ORESoftware","description":"Write standardized JSON to stdio streams. Parse a standardized stdio stream.","archived":false,"fork":false,"pushed_at":"2019-10-22T00:03:19.000Z","size":39,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"dev","last_synced_at":"2024-04-26T18:23:07.291Z","etag":null,"topics":["inter-process-communication","ipc","json","nodejs","stderr","stdout","text-streams","unix","unix-philosophy"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/ORESoftware.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"license.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-11-06T18:52:12.000Z","updated_at":"2019-10-22T00:03:21.000Z","dependencies_parsed_at":"2022-09-09T00:41:25.520Z","dependency_job_id":null,"html_url":"https://github.com/ORESoftware/json-stdio","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/ORESoftware%2Fjson-stdio","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ORESoftware%2Fjson-stdio/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ORESoftware%2Fjson-stdio/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ORESoftware%2Fjson-stdio/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ORESoftware","download_url":"https://codeload.github.com/ORESoftware/json-stdio/tar.gz/refs/heads/dev","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246604610,"owners_count":20804100,"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":["inter-process-communication","ipc","json","nodejs","stderr","stdout","text-streams","unix","unix-philosophy"],"created_at":"2024-10-26T11:23:30.549Z","updated_at":"2026-04-13T18:02:37.970Z","avatar_url":"https://github.com/ORESoftware.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n\n# json-stdio\n\n\u003cbr\u003e\n\n[![Version](https://img.shields.io/npm/v/json-stdio.svg?colorB=green)](https://www.npmjs.com/package/json-stdio)\n\n\u003cbr\u003e\n\n\u003e\n\u003e This library allows two Node.js processes to easily communicate via stdout/stderr/stdin.\n\u003e\n\n\u003cp\u003e\n\n### Usage / Getting Started\n\n## Importing\n\n```js\nimport stdio = require('json-stdio');    //   TypeScript\nimport * as stdio from 'json-stdio';     //   ESNext / ES-Whatever\nconst stdio = require('json-stdio');     //   Old-Skool\n```\n\n\n## Writing to stdout/stderr (sender process):\n\n```javascript\n// log a file path, which can be received by another process\n\nconst stdio = require('json-stdio');\nconst filePath = '/foo/bar';\nstdio.log({fp: filePath});\nstdio.logerr({fp: filePath});\n\n```\n\n\n### Parsing a stream  (receiver process)\n\n```javascript\nconst stdio = require('json-stdio');\nconst cp = require('child_process');\n\nconst k = cp.spawn('bash');\n\nconst parser = stdio.createParser();\nconst stdEventName = stdio.stdEventName;  // '@json-stdio-event'\n\nk.stdout.pipe(parser).on(stdEventName, obj =\u003e {\n  \n    // obj is an object like so:\n    // {fp: '/foo/bar'}\n});\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foresoftware%2Fjson-stdio","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foresoftware%2Fjson-stdio","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foresoftware%2Fjson-stdio/lists"}