Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] BiliClient 的 GetNavInfo API,当前用户为6级时,json解析失败 #10

Open
wentiancanye opened this issue Oct 23, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@wentiancanye
Copy link

API名称:GetNavInfo
错误原因:当前用户为6级时,json解析失败。因为当用户6级时,next_exp 是 "--",而不是数字。
报错:cannot unmarshal string into Go struct field NavInfoLevel.level_info.next_exp of type int
type NavInfoLevel struct {
CurrentLevel int json:"current_level" // 当前等级
CurrentMin int json:"current_min" // 当前等级经验最低值
CurrentExp int json:"current_exp" // 当前经验
NextExp int json:"next_exp" // 升级下一等级需达到的经验,就是这个会报错
}

@wentiancanye wentiancanye added the bug Something isn't working label Oct 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant