-
Type: Improvement
-
Resolution: Fixed
-
Priority: Unknown
-
Affects Version/s: None
-
Component/s: BSON
-
None
-
Fully Compatible
The dbref spec (https://github.com/mongodb/specifications/blob/master/source/extended-json.rst) requires that the special fields are first in the hash. I suggest reordering the fields in the constructor which will then automatically produce the correct serialization output e.g. in bson.