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

在库里面怎样解决Gson解析数据用map接收时int自动转化为double问题 #9

Closed
hopelesszxq opened this issue May 11, 2021 · 2 comments

Comments

@hopelesszxq
Copy link

Map map=new HashMap<>();
map.put("a",1);
map.put("b",2);
String json=mGson.toJson(map);
Map result=mGson.fromJson(json,Map.class);

result中的a值为1.0,b为2.0

@getActivity
Copy link
Owner

小伙子,你这个问题跟框架好像没啥关系吧?

@getActivity
Copy link
Owner

框架只能帮你处理容错的问题,这个问题不属于 Json 容错的范畴之内。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants