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

请问如何将json string反射成复杂的泛型类型? #473

Open
yyyfind opened this issue Jul 17, 2024 · 2 comments
Open

请问如何将json string反射成复杂的泛型类型? #473

yyyfind opened this issue Jul 17, 2024 · 2 comments

Comments

@yyyfind
Copy link

yyyfind commented Jul 17, 2024

请问如何将json string反射成复杂的泛型类型?
拦截feign接口,feign接口的返回是APIResp这种格式的,想要改变返回,怎样把json string反射成 期望的APIResp这种格式? 参考了这个issue #310 用了getGenericReturnType(),类型转换还是报错了。
IMG_20240717_175328

@code-bez
Copy link

code-bez commented Jul 17, 2024 via email

@Aresxue
Copy link

Aresxue commented Jul 30, 2024

可以暂时使用fastjson2完成这个事情,它是自举的,开启WriteClassName功能就好了,别的对人类友好且能自举的语言替代品不多。

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

3 participants