Do not emit BJData Draft-3 byte marker in Draft 2 - #5437
Conversation
_ArrayType_ byte mapped to B even when to_bjdata used the default Draft-2 version. B is Draft-3 only, so fall back to a plain object unless draft3 is requested. Signed-off-by: elix3r <157088510+22elix3r@users.noreply.github.com>
|
The Draft-2 gate works — I checked the bytes on this branch: Two things from #5404 are still open, though. 1. The second half of the issue. Its title is "and the value does not round-trip", and the body raises it as a separate defect:
That is unchanged in Draft 3 — 2. Docs.
with no Draft-3 caveat, even though Generated by Claude Code |
🔴 Amalgamation check failed! 🔴The source code has not been amalgamated and/or formatted correctly. 📎 A ready-to-apply patch is attached to the failed workflow run as the git apply amalgamation.patchThis does not require installing astyle yourself. |
Summary
`to_bjdata()` mapped ndarray `ArrayType = "byte"` to marker `B` even with the default Draft-2 version. `B` is Draft-3-only, so that stream is invalid for Draft-2 readers and does not round-trip as an annotated array.
Related Issue
Fixes #5404
Changes Made
Testing
Commands executed:
Results:
Notes
uint8 remains the Draft-2 way to encode 8-bit values. Draft 3 is unchanged.