[GODRIVER-646] Decoding javascript into bson.D fails Created: 21/Nov/18  Updated: 28/Oct/23  Resolved: 27/Nov/18

Status: Closed
Project: Go Driver
Component/s: BSON
Affects Version/s: None
Fix Version/s: 0.1.0

Type: Bug Priority: Critical - P2
Reporter: Eric Daniels (Inactive) Assignee: Kristofer Brandow (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: File types_test.bson    

 Description   

It fails with the following error: "cannot decode javascript into a string type"

Attached is a sample BSON file.



 Comments   
Comment by Githook User [ 27/Nov/18 ]

Author:

{'name': 'Kris Brandow', 'email': 'kris@mongodb.com', 'username': 'skriptble'}

Message: Ensure JavaScript and Symbol codecs are registered

Register the JavaScript and Symbol encoder and decoder functions when
registering the primitive codecs.
Fix bug in Symbol encoder that wrote JavaScript as the type instead of
Symbol.
Add tests for conversion of bson.D to and from JavaScript and Symbol.
Fix tests for symbol encoding.

GODRIVER-646

Change-Id: I090e19844031d40ae778c460c4eaa7fc1edbce73
Branch: master
https://github.com/mongodb/mongo-go-driver/commit/9929f179fb8c473b4f62ff57bdcd90eaef70c439

Comment by Kristofer Brandow (Inactive) [ 26/Nov/18 ]

Code Review: https://review.gerrithub.io/c/mongodb/mongo-go-driver/+/434892.

Generated at Thu Feb 08 08:34:39 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.