Register an InstanceCreator with Gson for this type to fix this problem.
2015-06-11 11:27
1161 查看
在转换过程中会抛出“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强烈不建议使用此方法。
an InstanceCreator with Gson for this type to fix this problem”所示,用Gson为其提供一个内部实例创建器,但GSON强烈不建议使用此方法。
相关文章推荐
- JavaScript中变量的类型
- 使用集合(ArrayList,HashMap等做对比)实现员工管理系统案例
- js如何判断是否在iframe中及防止网页被别站用 iframe嵌套 (Load denied by X-Frame-Options)
- 天堂Lineage(單機版)從零開始架設教學 Installing Lineage 3.52 Server - On Windows
- 对各团队评价
- struts2配置详解
- C实现 LeetCode->Integer to Roman
- hihocoder #1035 : 自驾旅行 III 树形DP
- JAVA 中两种判断输入的是否是数字的方法
- Day12:看节目对于高考的想法
- 利用SQL注入漏洞登录后台
- LeetCode 之 Implement strStr() — C 实现
- 更换Prezi的logo
- 使用AudioTrack进行音频播放
- jQuery Visualize
- dx:trouble processing: bad class file magic (cafebabe) or version (0033.0000)
- Oracle默认密码
- Python标准库13 循环器 (itertools)
- form表单
- Hadoop分布式缓存