Closed teemukataja closed 2 years ago
Thanks for opening your first issue here! 🎉 Be sure to follow the issue template! If you need help or want to chat with us, join us on Discord https://gofiber.io/discord
I have a workaround solution by using agent.Bytes
instead and unmarshalling manually:
var r response
_, body, _ := agent.Bytes()
_ = json.Unmarshal(body, &r)
use a.JSONDecoder(json.Unmarshal).Struct(&r)
@teemukataja thanks for the hint, fixed it in the pull request #2137
will be in the next release
until then you have to set the default decoder by hand https://github.com/gofiber/fiber/issues/2134#issuecomment-1265283424
Bug Description
agent.Struct()
raises a null pointer exception.agent.Struct()
works in2.32.0
, but stopped working after2.33.0
, including the latest release2.38.1
.How to Reproduce
Working version with 2.32.0
2.32.0
ingo.mod
go mod tidy
Broken version 2.33.0-2.38.1
2.33.0
ingo.mod
go mod tidy
Expected Behavior
JSON response is unmarshalled into struct.
Fiber Version
2.33.0-2.38.1
Code Snippet (optional)
Checklist: