gin
gin copied to clipboard
ShouldBindQuery does not work properly
- With issues:
- It can't parse /api/characters?filter[name]=Shrek
Description
type CharactersFilter struct {
Name *string `json:"name" form:"name"`
}
type SearchDTO[Filter any] struct {
Pagination *PaginationDto `json:"pagination"`
Filter *Filter `json:"filter"`
}
How to reproduce
Send request to /api/characters?filter[name]=Shrek
I am familiar with the previous discussions, I intend to add the ability to parse nested Query Strings
I am familiar with the previous discussions, I intend to add the ability to parse nested Query Strings
You can try changing the request /api/characters?filter[name]=Shrek -> /api/characters?name=Shrek
@Madou-Shinni Look at this https://github.com/KoNekoD/go-querymap. I already done it :)