Giter VIP home page Giter VIP logo

proto-convert's Introduction

Hi! ๐Ÿ‘‹ I am Azeem. ๐Ÿค“

I am an experienced hands-on Software Engineer/Architect. ๐Ÿ’ป ๐Ÿ“š ๐Ÿ‹๏ธโ€โ™‚๏ธ
I use C, C++, Go, Ruby, Python, and other technologies to build software.
Contact me for freelance software development projects and collaborations.

Email | LinkedIn | StackOverflow | RubyGems | GitHub Public Repositories | GitHub Gists

Stack Exchange reputation GitHub User's stars Buy Me a Coffee

proto-convert's People

Contributors

dependabot[bot] avatar iamazeem avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

proto-convert's Issues

cannot load such file -- google/protobuf

Hello.

It seems that there is problem with importing Google types.

I'm using latest macos with protobuf installed via brew install protobuf
I've also tried on Ubuntu 18.04 copying includes folder to /usr/local/include/google/protobuf/
Results are the same.

git clone https://github.com/iamazeem/proto-convert.git
cd proto-convert/test
../bin/proto-convert -m j2b -p test.proto -t test.Message -i test.json -o test.bin
Possible 'import' issue! Use a single self-contianed .proto file! cannot load such file -- google/protobuf
ls -la  /usr/local/include/google/protobuf/
total 4072
drwxr-xr-x  71 krr  admin    2272 Jun  8 16:15 .
drwxr-xr-x   3 krr  admin      96 Jun  8 16:15 ..
-rw-r--r--   1 krr  admin    6365 Jun  8 16:15 any.h
-rw-r--r--   1 krr  admin   14209 Jun  8 16:15 any.pb.h
-rw-r--r--   1 krr  admin    5916 Jun  8 16:15 any.proto

Can we convert .proto file which implicitly call many .proto file?

I'm trying to convert my .proto file into binary format tp import converted binay file i6n postman to test with http put call. Over all to test .proto files with http call. But my main .proto files calling many .proto files to get messages? What should i change in the mentioned command? I'm raising it in issue, since i couldn't find other way to reach you?

proto-convert can't work with `/dev/stdin` or `/dev/fd/...`

I'm trying to use this with stdin but it is not working:

20220801T151952 [email protected]:~/sw/d/gitlab.com/aucampia/pvt/scratchpad/tech/cloudevents
$ proto-convert --mode j2b --proto spec/cloudevents.proto --msgtype io.cloudevents.v1.CloudEvent --verbose --input <(echo '{}') --output /dev/stdout
ERROR: Input file not found! [/dev/fd/63]
20220801T151957 [email protected]:~/sw/d/gitlab.com/aucampia/pvt/scratchpad/tech/cloudevents
$ echo '{}' | proto-convert --mode j2b --proto spec/cloudevents.proto --msgtype io.cloudevents.v1.CloudEvent --verbose --input /dev/stdin --output /dev/stdout
ERROR: Input file not found! [/dev/stdin]

[Feature] Handle nested/imported proto files with a command-line flag

If i try to convert to json using a proto file that contains import of the other proto file, this will bring error: proto file was not found or had errors..
To fix this, the protoc call must contain a special parameter --proto_path or -I with the path to search for other proto files..
This means, that this path, please, must be added to proto-convert as an additional parameter and used then in the internal protoc call..

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.