hertz
hertz copied to clipboard
fix(binding): fix default tag overriding JSON values in anonymous struct
What type of PR is this?
fix: fix default tag overriding JSON values in anonymous struct
Check the PR title.
- [x] This PR title match the format: <type>(optional scope): <description>
- [x] The description of this PR title is user-oriented and clear enough for others to understand.
- [x] Attach the PR updating the user documentation if the current PR requires user awareness at the usage level. User docs repo
(Optional) Translate the PR title into Chinese.
(Optional) More detailed description for this PR(en: English/zh: Chinese).
en:
- Anonymous embedded struct fields had incorrect JSONName (e.g., "PageInfo.page" instead of "page"), causing keyExist() to fail
- Default values from form/query tags were overriding JSON-provided values
zh(optional):
- 匿名嵌入结构体的字段JSONName构造错误(如"PageInfo.page"应为"page"),导致keyExist()判断失败
- form/query标签的默认值会覆盖JSON提供的值
(Optional) Which issue(s) this PR fixes:
Fixes #1454