2

I'm trying to convert my current Rest API from Express.js to GO using fiber, so I am a bit new to golang, i want to parse nested JSON to nested structure in request body, I even tried the same example on github go-fiber example, but I'm getting the error "schema: converter not found for User"

here is the example:

type User struct {
  FName string
  LName string
}

type respData struct {
  User
  Address
  Cart
}
respStruct := respData{}
err := c.BodyParser(&respStruct)
Abed Chouman
  • 61
  • 2
  • 5

0 Answers0