-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
bugIt is confirmed a bug, but don't worry, we'll handle it.It is confirmed a bug, but don't worry, we'll handle it.
Description
Go version
go 1.22.4 linux/arm64
GoFrame version
2.8.1
Can this bug be reproduced with the latest release?
Option Yes
What did you do?
Testing GET requests, the omitempty attribute in JSON is ineffective. This issue was not observed in version 2.4.
client.GetVar(ctx, url, params).Scan(&result)
What did you see happen?
The upgrade of gconv in #3170 has affected gclient requests. Inside the HTTP request, httputil.BuildParams uses gconv.Map, and the internal logic only ignores omitempty when MapOption's OmitEmpty is set to true. It seems there is no place to set this policy.
What did you expect to see?
the omitempty attribute I want the omitempty attribute in JSON to take effect.
gqcn
Metadata
Metadata
Assignees
Labels
bugIt is confirmed a bug, but don't worry, we'll handle it.It is confirmed a bug, but don't worry, we'll handle it.