We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
[]uint8
Hi goccy,
there's a problem when unmarshalling into []uint8, see below example:
package main import ( "fmt" "github.com/goccy/go-json" ) func main() { var uints []uint8 err := json.Unmarshal([]byte(`[0, 1, 2]`), &uints) if err != nil { panic(err) } fmt.Println(uints) }
which produces
panic: json: cannot unmarshal into Go value of type uint8
The above example does, however, work as expected with encoding/json.
encoding/json
PS: Quickly checking, I couldn't find another type that would suffer from this, besides []uint8.
Can you please take a look?
Cheers
The text was updated successfully, but these errors were encountered:
fix: add a fallback uint8 sliceDecoder to bytesDecoder
d9df77a
fix goccy#360
Merge pull request #361 from orisano/fix/#360
171d975
Successfully merging a pull request may close this issue.
Hi goccy,
there's a problem when unmarshalling into
[]uint8
, see below example:which produces
panic: json: cannot unmarshal into Go value of type uint8
The above example does, however, work as expected with
encoding/json
.PS: Quickly checking, I couldn't find another type that would suffer from this, besides
[]uint8
.Can you please take a look?
Cheers
The text was updated successfully, but these errors were encountered: