在转换过程中会抛出“No-args constructor for class com.pwm.gson.A$B does not exist”异常。
解析方法把内部类改为静态内部类
,或者按异常信息“Register an InstanceCreator with Gson for this type to fix this problem”所示,用Gson为其提供一个内部实例创建器,但GSON强烈不建议使用此方法。
Register an InstanceCreator with Gson for this type to fix this problem.
最新推荐文章于 2024-04-11 15:59:00 发布