当前位置:网站首页>异常记录-14
异常记录-14
2022-04-23 06:01:00 【week@eight】
异常类名
java.lang.ClassCastException
描述
com.alibaba.fastjson.JSONObject cannot be cast to java.lang.String
问题原因
jsonObject.get(“xxx”)为Object类型,无法直接在前面加(String)强行转为String类型
解决方案
使用toString()进行转String类型就行
异常重现
已复现
版权声明
本文为[week@eight]所创,转载请带上原文链接,感谢
https://blog.csdn.net/qq_43431735/article/details/124216753
边栏推荐
猜你喜欢
随机推荐
关于注解1
2021-09-18
修改Jupyter Notebook样式
AttributeError: ‘dict‘ object has no attribute ‘iteritems‘
TP5 使用redis
leetcode之爬楼梯方法数
bcc安装和基本工具使用说明
MySQL server standalone deployment manual
批量修改/批量更新数据库某一个字段的值
Concurrent optimization request
【代码解析(4)】Communication-Efficient Learning of Deep Networks from Decentralized Data
Kids and COVID: why young immune systems are still on top
[OSS file upload quick start]
rdam 原理解析
Leetcode integer plus one
rdma 介绍
【漏网之鱼】Ansible AWX调用playbook传参问题
offset和client获取dom元素位置信息
MySQL【ACID+隔离级别+ redo log + undo log】
ES6规范详解