-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
Minor - P4
-
None
-
Affects Version/s: None
Expected Behavior
As a user of js-bson
I expect only written bytes of a Binary to be encoded
When calling toExtendedJSON
Actual Behavior and Impact
- calling toExtendedJSON will base64 document values representing the full underlying buffer for binary types, not just the data therein.
- No known customer reports today.
Dependencies
- None
Risks/Unknowns
- Any consumer that was inadvertently relying on the padded base64 output (e.g., reading the full 256-byte allocation) would see a breaking change in serialized output.
Acceptance Criteria
Implementation Requirements
- Base64 of a binary should be representative of only the portion of the buffer that actually has data (IE: respect the 'position')
Testing Requirements
- None (already present in the external PR)
Documentation Requirements
- None
Follow Up Requirements
- None
- is duplicated by
-
NODE-7649 respect Binary position in toExtendedJSON
-
- Closed
-