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]android 使用 fastjson2 序列化崩溃 #520

Closed
wolfhawk163 opened this issue Jun 30, 2022 · 6 comments
Closed

[BUG]android 使用 fastjson2 序列化崩溃 #520

wolfhawk163 opened this issue Jun 30, 2022 · 6 comments
Labels
bug Something isn't working question Further information is requested
Milestone

Comments

@wolfhawk163
Copy link

wolfhawk163 commented Jun 30, 2022

问题描述

  • android targetSdk 31

  • 使用 fastjson2,版本 2.0.8

  • 测试代码如下

  Map<String, String> test = new HashMap<>();
        test.put("key0", "value0");
        String json = JSON.toJSONString(test);
        System.out.println(json );
  • 结果:崩溃

  • 将 fastjson2 换成 fastjson,版本 1.2.71

  • 没有问题

@wolfhawk163 wolfhawk163 added the bug Something isn't working label Jun 30, 2022
@wenshao
Copy link
Member

wenshao commented Jun 30, 2022

你用2.0.8.android

@wenshao wenshao added the question Further information is requested label Jun 30, 2022
@wolfhawk163
Copy link
Author

你用2.0.8.android

是的

implementation 'com.alibaba:fastjson:2.0.8'

换成 1.2.71 没问题了

@wenshao
Copy link
Member

wenshao commented Jul 1, 2022

用这个:

com.alibaba:fastjson:2.0.8.android

@wolfhawk163
Copy link
Author

用这个:

com.alibaba:fastjson:2.0.8.android

可以了 谢谢

1 similar comment
@wolfhawk163
Copy link
Author

用这个:

com.alibaba:fastjson:2.0.8.android

可以了 谢谢

@wenshao wenshao added this to the 2.0.9 milestone Jul 10, 2022
@wenshao
Copy link
Member

wenshao commented Jul 10, 2022

https://github.com/alibaba/fastjson2/releases/tag/2.0.9
问题已修复,请用新版本

@wenshao wenshao closed this as completed Jul 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants