-
Notifications
You must be signed in to change notification settings - Fork 129
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
Decode vs. encode in node.js #78
Comments
Hi folks, Source code:
Error:
Do you guys have any clue what is the reason for the error? Cheers! |
Hi folks, Here is the code example:
And here is the respective CLI output:
|
@dancesWithCycles Protobufs are simply a way to serialize data (typically into a packed, binary format), so a successful encoding output is only verifiable by performing a corresponding decode on that encoded message. If you wanted to ensure that the output is truly language and platform neutral, you could take the resulting output and deserialize it using another language. The expectation is that the encoded message could still be decoded. |
proto3 version does have a canonical JSON format (as opposed to binary) for serialization, which can help with debugging and triaging these sorts of issues via manual human inspection, but GTFS-Realtime currently uses the proto2 version, so that isn't applicable here |
Hi folks,
I hope this finds you well. I hope I am blind or misunderstood the bindings version for node.js. I can get a decode example working but not for encoding. Here are the respective decoding and encoding source files. Can anyone open up my eyes please?
Decoding:
Encoding:
Decoding output:
Encoding output:
Cheers!
The text was updated successfully, but these errors were encountered: