-
Type: Bug
-
Resolution: Duplicate
-
Priority: Major - P3
-
None
-
Affects Version/s: 1.4.3
-
Component/s: BSON
-
None
similar to issue https://jira.mongodb.org/browse/GODRIVER-1235
However, if the json document contains a field that is not defined in the struct and that field happens to be an array, the Skip() call on line 284 os struct_codec.go reads all the way to the end of document (EOD) and the DecodeValue() returns, it doesn't continue parsing the other fields in the document. Attached is a series of tests that show the behavior. I don't see any struct flags and or other flags to change this behavior.
If an undefined field is a primitive (string, int, etc), the parser works fine. If the undefined field is another struct/map the parser works fine.
- duplicates
-
GODRIVER-1235 Extended JSON can fail to parse if undefined document field contains a document or an array
- Closed
- is related to
-
GODRIVER-1235 Extended JSON can fail to parse if undefined document field contains a document or an array
- Closed