-
Notifications
You must be signed in to change notification settings - Fork 76
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
mapper.toBean()怎么指定使用Jackson来进行反序列化? #78
Comments
你的用法示对的,如果得不到值,可以先把 响应报文体打印一下看看服务器端返回的是什么。 另外: HttpResult.Body body = result.getBody().cache();
Mapper mapper = body.toMapper();
Token token = mapper.toBean(Token.class);
// 以上三行代码等同于下面两行:
HttpResult.Body body = result.getBody().cache();
Token token = body.toBean(Token.class); |
我这边返回的body如下: |
你使用的哪个版本?,如果不行就直接用 HttpResult.Body body = result.getBody().cache();
Token token = body.toBean(Token.class); |
3.5.3 |
嗯,这个版本的 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Token token = mapper.toBean(Token.class); 不生效,得到token里的值都是null或0
到底要怎么用?
The text was updated successfully, but these errors were encountered: