When reading mixed relaxed and canonical extended JSON in relaxed parsing mode (for instance: { "_id": 1, "encrypted_long":
{ "$numberLong": 123 }}), our parser loses type information making it impossible to roundtrip the Long value correctly. This will be a breaking change, but perhaps we can offer a compat mode until the next major release.
We should perhaps even consider that parsing should never be relaxed vs canonical, and reserve relaxed mode only for generating extended JSON.
Relevant lines: