Skip to content

fix(jlexer): accept JSON integer arrays for []byte - #444

Open
Solaris-star wants to merge 1 commit into
mailru:masterfrom
Solaris-star:fix/434-bytes-json-array
Open

fix(jlexer): accept JSON integer arrays for []byte#444
Solaris-star wants to merge 1 commit into
mailru:masterfrom
Solaris-star:fix/434-bytes-json-array

Conversation

@Solaris-star

Copy link
Copy Markdown

Summary

encoding/json accepts []byte as a base64 string or a JSON array of integers. Lexer.Bytes only handled base64, breaking array payloads (#434).

Fix

Support both forms in Lexer.Bytes.

Tests

go test ./jlexer -count=1
# ok

Fixes #434

encoding/json allows []byte as base64 string or array of integers.
Lexer.Bytes only handled base64; support the array form for
compatibility (mailru#434).

Fixes mailru#434
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.

[]byte parsing rejects JSON arrays of integers, unlike encoding/json

1 participant