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

Use base64 to encode []byte by default #423

Open
bokunodev opened this issue Aug 16, 2024 · 1 comment
Open

Use base64 to encode []byte by default #423

bokunodev opened this issue Aug 16, 2024 · 1 comment

Comments

@bokunodev
Copy link

Marshal []byte into base64 string instead of array of integers.

@bokunodev bokunodev changed the title Use base64 or hex to encode []byte by default Use base64 to encode []byte by default Aug 16, 2024
@arp242
Copy link
Collaborator

arp242 commented Sep 27, 2024

[]byte is just an alias for []uint8. While I don't expect many people are marshaling []uint8 slices to TOML, changing this would make it impossible as there is no way to distinguish between the two.

I also don't think using base64 is strictly better than using an array. Both are reasonable, but I wouldn't want to force one or the other.

Maybe an option can be added once I (finally) finish #328. I don't know. It certainly shouldn't be the default.

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

No branches or pull requests

2 participants