Skip to content

fix(BREV-2112): Allow unmarshalling of empty Bytes#60

Merged
drewmalin merged 2 commits intomainfrom
dmalin/BREV-2112
Nov 12, 2025
Merged

fix(BREV-2112): Allow unmarshalling of empty Bytes#60
drewmalin merged 2 commits intomainfrom
dmalin/BREV-2112

Conversation

@drewmalin
Copy link
Contributor

@drewmalin drewmalin commented Nov 12, 2025

As the JSON objects are so widespread, it is not uncommon for the "zero" value of the Bytes object to be automatically used.

Because of this, it doesn't make sense to throw an error if the empty "unit" is encountered (even though this is technically invalid).

The fix here is to simply convert from the "empty" JSON structure to the "zero" Bytes value, which is functionally equivalent.

@drewmalin drewmalin marked this pull request as ready for review November 12, 2025 21:50
@drewmalin drewmalin requested a review from a team as a code owner November 12, 2025 21:50
@drewmalin drewmalin changed the title fix(BREV-2112): Allow unmarshalling of empty bytes fix(BREV-2112): Allow unmarshalling of empty Bytes Nov 12, 2025
@drewmalin drewmalin merged commit c9c94be into main Nov 12, 2025
7 of 8 checks passed
@drewmalin drewmalin deleted the dmalin/BREV-2112 branch November 12, 2025 22:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants