You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I am having a related issue. After .toObject(), the repeated field in the message will be displayed as an array with an object in it. For example, the message will show:
{ field1: 0,
field2: 1,
repeated_field: [Object]}
Is there a way to call toObeject and correctly display the repeated fields? Thank you.
@jsievenpiper Are you using proto3? In proto3 primitive fields are packed by default, so that might explain the behavior you're seeing. However, it does look like there may be a bug here, because parsers are supposed to be able to accept the data whether it's packed or not, and it appears as though the JS parsing code can only handle the one format it's expecting.
@a655329 That sounds like it might be a separate issue; could you post an example .proto file with a proto message that has this problem?
Using
protoc
3.1.. We're using the JavaNano project for our serializer, and the JS project as our deserializer.Given the message:
The JS project seems to always generate code for
readPackedField
, even though the serializer and message are unpacked. Is this by design?The text was updated successfully, but these errors were encountered: