当前位置:网站首页>异常记录-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
边栏推荐
猜你喜欢
随机推荐
[ES6 quick start]
useCenterHook
如何通过dba_hist_active_sess_history分析数据库历史性能问题
Typescript (top)
Leetcode刷题之实现strStr()
TP5 使用redis
阅读笔记:Meta Matrix Factorization for Federated Rating Predictions
Leak detection and vacancy filling (III)
Implementation of leetcode question brushing str ()
TypeScript(上)
ovs与ovs+dpdk架构分析
tensorflow下载
ES6 specification details
rdma网络介绍
Introduction to the top 12 domestic databases in 2021
DNA reveals surprise ancestry of mysterious Chinese mummies
JS实现网页轮播图
基於DPDK實現VPC和IDC間互聯互通的高性能網關
并发优化请求
Oracle数据库性能分析之常用视图