I am new to protocol buffer and I am trying to decode data from an api response.
I get encoded data from the api response and I have a .proto file to decode the data, how do I decode the data in nodeJS. I have tried using protobuf.js but I am very confused, I have spent hours trying to solve my problem looking at resources but I cannot find a solution.
Protobufjs allows us to encode and decode protobuf messages to and from binary data, based on .proto files.
Here's a simple example of encoding and then decoding a test message using this module:
And the .proto file: