{"id":23074481,"url":"https://github.com/iamazeem/proto-convert","last_synced_at":"2025-04-10T19:40:48.668Z","repository":{"id":56889369,"uuid":"277753747","full_name":"iamazeem/proto-convert","owner":"iamazeem","description":"a CLI tool to convert protobuf messages from binary to JSON and vice versa","archived":false,"fork":false,"pushed_at":"2024-09-19T09:22:39.000Z","size":54,"stargazers_count":33,"open_issues_count":0,"forks_count":4,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-24T17:14:59.160Z","etag":null,"topics":["binary","cli-app","command-line-tool","converter","hacktoberfest","json","protobuf","protocol-buffers","ruby-gem"],"latest_commit_sha":null,"homepage":"https://github.com/iamAzeem/proto-convert","language":"Ruby","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/iamazeem.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,"publiccode":null,"codemeta":null}},"created_at":"2020-07-07T07:57:09.000Z","updated_at":"2025-03-24T16:49:26.000Z","dependencies_parsed_at":"2023-12-18T18:01:09.851Z","dependency_job_id":"54a79240-dea5-4957-888c-3b81bc30e665","html_url":"https://github.com/iamazeem/proto-convert","commit_stats":{"total_commits":49,"total_committers":1,"mean_commits":49.0,"dds":0.0,"last_synced_commit":"c4d3741b129a63a7c3f39a945f836986534504a7"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iamazeem%2Fproto-convert","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iamazeem%2Fproto-convert/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iamazeem%2Fproto-convert/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iamazeem%2Fproto-convert/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iamazeem","download_url":"https://codeload.github.com/iamazeem/proto-convert/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248281416,"owners_count":21077423,"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":["binary","cli-app","command-line-tool","converter","hacktoberfest","json","protobuf","protocol-buffers","ruby-gem"],"created_at":"2024-12-16T08:28:33.934Z","updated_at":"2025-04-10T19:40:48.640Z","avatar_url":"https://github.com/iamazeem.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# proto-convert\n\n[![ci](https://github.com/iamazeem/proto-convert/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/iamazeem/proto-convert/actions/workflows/ci.yml)\n[![License: MIT](https://img.shields.io/badge/license-MIT-darkgreen.svg?style=flat-square)](https://github.com/iamAzeem/proto-convert/blob/master/LICENSE)\n![GitHub release (latest by date)](https://img.shields.io/github/v/release/iamAzeem/proto-convert?style=flat-square)\n[![RubyGems Downloads](https://img.shields.io/gem/dt/proto-convert?style=flat-square)](https://rubygems.org/gems/proto-convert)\n\n[proto-convert](https://github.com/iamAzeem/proto-convert) is a CLI tool\nto convert [protobuf](https://github.com/protocolbuffers/protobuf) messages\nfrom binary to [JSON](https://www.json.org/json-en.html) and vice versa.\n\n[Tested](./test/run_tests.sh) on Ubuntu, macOS and Windows runners.\nFor details, see [CI workflow](./.github/workflows/ci.yml).\n\n## Installation\n\nMake sure that the Protocol Buffers Compiler `protoc` is installed. Follow these\n[instructions](https://github.com/protocolbuffers/protobuf#protocol-compiler-installation)\nto install it.\n\nInstall `proto-convert` with [RubyGems](https://rubygems.org/pages/download):\n\n```shell\ngem install proto-convert\n```\n\nDepending on your installed Ruby version, the latest `google-protobuf` may not\ninstall due to compatibility issues. You need to install the older version\nyourself or you may choose to upgrade to a later Ruby version.\n\nIt has also been observed that the installed `protoc` and `google-protobuf` gem\nmay be incompatible and may result into compilation failure of the `input`\nfile on runtime.\n\n- For Ruby 2.6, `protoc` v3.17.3 and `google-protobuf` v3.12 work fine.\n- For Ruby 2.7 and later, the latest versions of both should work fine.\n\n## Usage\n\nRun `proto-convert -h` for usage help.\n\n```text\n$ proto-convert -h\nUsage: bin/proto-convert -m [mode] -p [proto] -t [msgtype] -i [input] -o [output]\n\nOPTIONS:\n\n    -m, --mode [MODE]                conversion mode [\"binary2json\", \"b2j\", \"json2binary\", \"j2b\"]\n    -p, --proto [FILENAME]           protobuf schema (.proto)\n    -t, --msgtype [TYPE]             fully-qualified message type\n    -i, --input [FILENAME]           source file (JSON/binary)\n    -o, --output [FILENAME]          destination file (binary/JSON)\n    -v, --verbose                    print verbose information\n    -h, --help                       print help\n```\n\n**NOTE**: Use `-v` / `--verbose` flag to print detailed intermediate steps.\n\n## Test Run\n\nConsider this simple .proto file ([`test.proto`](test/test.proto)):\n\n```protobuf\nsyntax = \"proto3\";\n\npackage test;\n\nmessage Message {\n    int32 id = 1;\n    string body = 2;\n}\n```\n\nSee [`test`](test) directory for test files.\n\n### JSON to Binary Conversion\n\n```text\n$ proto-convert -m j2b -p test.proto -t test.Message -i test.json -o test.bin\n\u003e\u003e [J] test.json (24 bytes)\n\u003c\u003c [B] test.bin (8 bytes)\n```\n\n### Binary to JSON Conversion\n\n```text\n$ proto-convert -m b2j -p test.proto -t test.Message -i test.bin -o test.json\n\u003e\u003e [B] test.bin (8 bytes)\n\u003c\u003c [J] test.json (24 bytes)\n```\n\nOutput:\n\n```text\n$ cat test.json\n{\"id\":123,\"body\":\"test\"}\n```\n\n## Contribute\n\n- [Fork](https://github.com/iamazeem/proto-convert/fork) the project.\n- Check out the latest `main` branch.\n- Create a `feature` or `bugfix` branch from `main`.\n- Commit and push your changes.\n- Make sure to add tests. See [CI](./.github/workflows/ci.yml).\n- Run [Rubocop](https://github.com/rubocop/rubocop) and fix the lint errors.\n- Submit the PR.\n\n## License\n\n[MIT](https://github.com/iamAzeem/proto-convert/blob/master/LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiamazeem%2Fproto-convert","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fiamazeem%2Fproto-convert","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiamazeem%2Fproto-convert/lists"}