fabric-protos icon indicating copy to clipboard operation
fabric-protos copied to clipboard

[nodebinding] missing FromOject alternative

Open davidkhala opened this issue 2 years ago • 5 comments

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 protobufjs

typeObject.encode(JSObject).finish()

where 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.

davidkhala avatar Jun 18 '22 14:06 davidkhala