Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add bytelength to JSON representations of byte arrays #7

Merged
merged 1 commit into from
Dec 2, 2024

Conversation

kitsonk
Copy link
Contributor

@kitsonk kitsonk commented Nov 30, 2024

This makes it possible to understand the size of the byte array in the JSON representation without having to decode the base64 string. This is useful for situations where you want to represent the byte array in a human-readable way.

I had added it at some point to kv-toolbox, but somehow had missed it when I contributed the JSON encoding to here, but it is super useful when attempting to display a value without having to decode it.

This makes it possible to understand the size of the byte array in the
JSON representation without having to decode the base64 string. This is
useful for situations where you want to represent the byte array in a
human-readable way.
Copy link
Member

@kt3k kt3k left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds reasonable to me 👍

@kt3k kt3k merged commit 69db4a3 into denoland:main Dec 2, 2024
5 checks passed
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