Closed pmosconi closed 8 months ago
Hey Paolo, the error message suggests that there's a tag with an unexpected wire type EndGroup (4). It might be a red herring though - it's possible that there is a different issue that leads us to parse data that is not a tag as a tag.
I don't think you can avoid to take a closer look at the binary data, to understand what is actually encoded, and where the issue comes from. protobuf-ts passes the protobuf conformance test suite, so I'm suspecting that the software producing the data has a bug.
The page about Encoding on protobuf.dev is a good starting point. Even if the data you receive is broken, you could write your own deserializer using BinaryReader
from protobuf-ts to parse it.
Hi, I am trying to migrate a python application that is a few years old to something newer and in a language I'm more comfortable with. Unfortunately I am unable to decode the message I am receiving (btw, 5 years ago the python library was the only one able to manage it).
Proto file:
Plugin generation options:
--ts_opt output_javascript_es2020
Sample code:
The message should translate to this:
Thanks in advance for any suggestion. paolo