Deserialization error with an repeated of struct field
- Dominant language
- JavaScript
- Stars
- 9.3k
- Forks
- 802
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 5
Description
Hello,
I have an issue with an repeated struct field. My client raise the exception below during the deserialization:
`Error in response deserializer function `
It's seems to be from deserializeBinaryFromReader() function in my _pb.js file :
```js
case 10:
var value = new google_protobuf_struct_pb.Struct;
reader.readMessage(value,google_protobuf_struct_pb.Struct.deserializeBinaryFromReader);
msg.addConditionalTitles(value);
break;
```
I modified it and used setConditionalTitlesList() instead of addConditionalTitles() and it's working :
```js
var condiationalTitles = []
switch (field) {
...
case 10:
var value = new google_protobuf_struct_pb.Struct;
reader.readMessage(value,google_protobuf_struct_pb.Struct.deserializeBinaryFromReader);
condiationalTitles.push(value)
msg.setConditionalTitlesList(condiationalTitles);
break;
...
}
```
my proto message
```proto
message ReferencialNode {
string uuid = 1;
bool annexe = 2;
string label = 3;
string description = 4;
string expert_comment = 5;
repeated string mission_codes = 6;
repeated string type_codes = 7;
repeated string destination_codes = 8;
string modification_of = 9;
repeated google.protobuf.Struct conditional_titles = 10; // <==== HERE
...
}
```
Someone knows why addConditionalTitles() doesn't work ?
Contributor guide
Assessment
This issue has not been assessed yet.