Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default value for bytes field? #566

Closed
paralin opened this issue Dec 16, 2016 · 4 comments
Closed

Default value for bytes field? #566

paralin opened this issue Dec 16, 2016 · 4 comments

Comments

@paralin
Copy link

paralin commented Dec 16, 2016

Can we add an option to asJSON for bytes to force the bytes fields to consistently come out as Node Buffers?

The issue is that the GRPC code expects buffers but sometimes gets [] due to the defaults option.

@dcodeIO
Copy link
Member

dcodeIO commented Dec 17, 2016

Yes, sir. Going to add { bytes: Buffer }

dcodeIO added a commit that referenced this issue Dec 17, 2016
@dcodeIO
Copy link
Member

dcodeIO commented Dec 17, 2016

Give it a try!

@dcodeIO
Copy link
Member

dcodeIO commented Dec 19, 2016

Closing this issue for now. Feel free to reopen it if necessary!

@dcodeIO dcodeIO closed this as completed Dec 19, 2016
@dcodeIO
Copy link
Member

dcodeIO commented Jan 12, 2017

FYI: 6.5.0 does not have bytes: Buffer anymore, which I further explain here while making an assumption. Do you know why exactly this is required in gRPC?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants