{"id":41322831,"url":"https://github.com/revinate/protobuf2json","last_synced_at":"2026-01-23T05:57:04.116Z","repository":{"id":65476038,"uuid":"124605611","full_name":"revinate/protobuf2json","owner":"revinate","description":"Convert protobuf-encoded messages to JSON and vice versa","archived":false,"fork":false,"pushed_at":"2018-03-19T18:01:12.000Z","size":13,"stargazers_count":17,"open_issues_count":0,"forks_count":5,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-11-27T09:34:37.867Z","etag":null,"topics":["json","protobuf","protocol-buffer"],"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/revinate.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}},"created_at":"2018-03-09T23:54:29.000Z","updated_at":"2024-12-13T19:36:59.000Z","dependencies_parsed_at":"2023-01-25T06:15:20.505Z","dependency_job_id":null,"html_url":"https://github.com/revinate/protobuf2json","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/revinate/protobuf2json","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/revinate%2Fprotobuf2json","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/revinate%2Fprotobuf2json/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/revinate%2Fprotobuf2json/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/revinate%2Fprotobuf2json/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/revinate","download_url":"https://codeload.github.com/revinate/protobuf2json/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/revinate%2Fprotobuf2json/sbom","scorecard":{"id":772767,"data":{"date":"2025-08-11","repo":{"name":"github.com/revinate/protobuf2json","commit":"cd58e5726b9ca1b07e7f13120f1e801e10c46634"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":0,"reason":"Found 0/8 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-23T02:38:41.071Z","repository_id":65476038,"created_at":"2025-08-23T02:38:41.071Z","updated_at":"2025-08-23T02:38:41.071Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28681581,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-23T05:48:07.525Z","status":"ssl_error","status_checked_at":"2026-01-23T05:48:07.129Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["json","protobuf","protocol-buffer"],"created_at":"2026-01-23T05:57:03.357Z","updated_at":"2026-01-23T05:57:04.112Z","avatar_url":"https://github.com/revinate.png","language":"JavaScript","readme":"# protobuf2json\n\nCommand-line utility to convert protobuf-encoded messages to JSON and vice versa.\n\n## Installation\n\n```\n$ npm install -g protobuf2json\n```\n\n## Usage\n\n### Convert protobuf to JSON\n\n```\n$ protobuf2json -h\n\n  Usage: protobuf2json [options]\n\n  Convert protobuf to JSON\n\n\n  Options:\n\n    -V, --version           output the version number\n    -d, --directory \u003cpath\u003e  path to base directory containing proto file and all its imports\n    -p, --proto \u003cpath\u003e      path to proto file relative to base directory\n    -t, --type \u003cname\u003e       protobuf message type\n    -m, --multi             multiple protobuf messages with prefixed signed 32-bit big endian message length\n    -h, --help              output usage information\n```\n\nThe protobuf-encoded message(s) is given as stdin. For example, suppose all of our proto files are in\nthe `protos` directory. Inside the directory there is `my_message.proto` containing the `MyMessage` message.\n`my_message.proto` may import other proto files located inside the `protos` directory and subdirectories.\nThe following command will decode the `my_message.bin` file containing a single protobuf-encoded `MyMessage`\nand emit the JSON to stdout:\n\n```\n$ protobuf2json -d protos -p my_message.proto -t MyMessage \u003c my_message.bin\n```\n\nIf multiple messages are combined in the input, each message must be prefixed with a signed, 32-bit\nbig endian integer indicating the length of the message. A file in this encoding can be converted to\nJSON as follows:\n\n```\n$ protobuf2json -d protos -p my_message.proto -t MyMessage -m \u003c my_messages.bin\n```\n\n### Convert JSON to protobuf\n\n```\n$ json2protobuf -h\n\n  Usage: json2protobuf [options]\n\n  Convert JSON to protobuf\n\n\n  Options:\n\n    -V, --version           output the version number\n    -d, --directory \u003cpath\u003e  path to base directory containing proto file and all its imports\n    -p, --proto \u003cpath\u003e      path to proto file relative to base directory\n    -t, --type \u003cname\u003e       protobuf message type\n    -m, --multi             multiple JSON messages separated by newlines\n    -h, --help              output usage information\n```\n\nThe JSON message(s) is given as stdin. For example, suppose all of our proto files are in\nthe `protos` directory. Inside the directory there is `my_message.proto` containing the `MyMessage` message.\n`my_message.proto` may import other proto files located inside the `protos` directory and subdirectories.\nThe following command will encode the `my_message.json` file containing a single `MyMessage` in JSON form\nand emit the encoded protobuf to stdout:\n\n```\n$ json2protobuf -d protos -p my_message.proto -t MyMessage \u003c my_message.json\n```\n\nIf multiple JSON messages are combined in the input, each message must be a single line, and terminated\nby a newline. A file in this encoding can be converted to protobuf as follows:\n\n```\n$ json2protobuf -d protos -p my_message.proto -t MyMessage -m \u003c my_messages.json\n```\n\n### Usage with kafkacat\n\nThis utility can be used with [kafkacat](https://github.com/edenhill/kafkacat) to publish protobuf-encoded\nmessages to Kafka topics, and to examine the contents of Kafka topics containing protobuf-encoded messages.\n\nTo publish a protobuf-encoded message to Kafka:\n\n```\n$ json2protobuf -d protos -p my_message.proto -t MyMessage \u003c my_message.json | kafkacat -P -b \u003cbroker\u003e -t \u003ctopic\u003e -D \\t\n```\n\nTo print the contents of a protobuf-encoded Kafka topic to stdout:\n\n```\n$ kafkacat -C -b \u003cbroker\u003e -t \u003ctopic\u003e -e -o beginning -f '%R%s' | protobuf2json -d protos -p my_message.proto -t MyMessage -m\n```\n\nNote the use of the `-f '%R%s'` argument to `kafkacat` to produce length-prefixed message output and\nthe `-m` argument to `protobuf2json` to support multiple messages as input.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frevinate%2Fprotobuf2json","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frevinate%2Fprotobuf2json","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frevinate%2Fprotobuf2json/lists"}