We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
`func (resp *Response) Unmarshal(v interface{}) error { if resp.content == nil { resp.Content() } return json.Unmarshal(resp.content, v) }
func (resp *Response) Json() (map[string]interface{}, error) { var result = make(map[string]interface{}) if err := resp.Unmarshal(&result); err != nil { return nil, err }else { return result, nil } }`
The text was updated successfully, but these errors were encountered:
我当时考虑,空间问题,和 增加了很多if,就没写成你说的那要。按照你说的,用起来更爽一些。
Sorry, something went wrong.
加一个Unmarshal方法替换原来的Json(),新的Json()不需要传参,建议考虑下。嘻嘻。。
嗯,你提交的代码我看了。很好,我考虑升级。
No branches or pull requests
`func (resp *Response) Unmarshal(v interface{}) error {
if resp.content == nil {
resp.Content()
}
return json.Unmarshal(resp.content, v)
}
func (resp *Response) Json() (map[string]interface{}, error) {
var result = make(map[string]interface{})
if err := resp.Unmarshal(&result); err != nil {
return nil, err
}else {
return result, nil
}
}`
The text was updated successfully, but these errors were encountered: