-
Notifications
You must be signed in to change notification settings - Fork 74
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
[nodebinding] missing FromOject alternative #113
Comments
In another way, it is a reverse of |
From what I can tell other people have asked similar questions, e.g. How to convert object to protobuf data in nodejs, and there is no equivalent to the protobufjs solution. Possibly related, "JSON support for well-known types hasn't been implemented in javascript yet". For reference, chaincode node PR hyperledger/fabric-chaincode-node#320 converted from a protobufjs based implementation to the new module, which does result in manually setting attributes. |
@jt-nti I believe it is inevitable and sad. We need to selectively pick up protobuf to write builders for own use. |
@davidkhala it's a pity you can't use the new module- the idea was to try and cut down the need for people to have to duplicate the effort of building the proto files themselves. |
Oh, I might get you confused. I mean I will use the new module, but still I have to suffered from write setter to get protobuf binary from js object, one by one, so selectively I would pick up those classes in module only when in use |
encode
then finish
I want a way to transform a javascript object(or json) to a protobuf binary without set attribute mannually to align schema.
We have found a simple way to do so when using
fabric-protos
, which depended on protobufjswhere the typeObject is the type constructor or type itself such as gateway.EvaluateRequest
Now I wonder if we can have similar clean solution now in
@hyperledger/fabric-protos
.The text was updated successfully, but these errors were encountered: