当前位置:网站首页>物联网平台返回数据解析时遇到org.json.JSONException: No value for Value怎么办
物联网平台返回数据解析时遇到org.json.JSONException: No value for Value怎么办
2022-07-24 21:58:00 【TMS320VC5257H】
使用android studio编写APP解析来自阿里云物联网平台返回的信息。

有时会遇到org.json.JSONException: No value for Value的错误信息
这个信息从哪里看呢?
是从android studio的logcat窗口观察,调试的时候在这个窗口会有提示。

解决方法是:到物联网平台查看所需调试的设备,物模型是否都有数据。如果没有数据,那么让设备上线,然后发送一个属性数据。或者用设备模拟器上报一个数据。再运行一下android studio,就可以发现问题消除了。

造成这个问题的原因是返回数据为空。
如果您的设备定义了很多个属性,而解析的时候,对每个属性进行解析,那么碰到有一个属性没有值,就会报空,而认为它是错误的。
所以这时候可能会报 org.json.JSONException: No value for XX异常。
边栏推荐
- Esp32485 air temperature and humidity test
- [postgraduate entrance examination English vocabulary training camp] day 11 - offer, form, maintain, critical
- Implementation of graph structure, from point to edge and then to graph
- GB、MB、KB分别是什么意思。大小分别是多少
- PCL点云处理之创建二维格网组织点云数据(六十四)
- 【数据库学习】Redis 解析器&&单线程&&模型
- Using FRP to achieve intranet penetration
- 窗口内最大值或最小值的更新结构——窗口内最大值
- Go+语言
- Pyqt5 uses qfile and qdatastream to read and write binary files
猜你喜欢

Push information to wechat through enterprise wechat self built application

《JUC并发编程 - 高级篇》05 -共享模型之无锁 (CAS | 原子整数 | 原子引用 | 原子数组 | 字段更新器 | 原子累加器 | Unsafe类 )

Web3 security go + security

Morris遍历

对萌新小白电脑运行速度变慢解决的方法get!٩( ‘ω‘ )و get!٩( ‘ω‘ )و

ACL 2022 | comparative learning based on optimal transmission to achieve interpretable semantic text similarity

Ue5 reports an error using the plug-in quixel Bridge

通过企业微信自建应用向微信推送信息

AC automata

SVM——针对线性可分(下)
随机推荐
Ue5 reports an error using the plug-in quixel Bridge
Monotonic stack structure exercise -- cumulative sum of minimum values of subarrays
Cell专刊|AI在蛋白结构、精准医疗、抗体疗法[综述]等的应用与未来预测
What are the methods of knowledge map relation extraction
PCD file of PCL point cloud processing to TXT file (single or multiple batch conversion) (63)
洛谷 P2024 [NOI2001] 食物链
Gradle learning - integration of gradle and idea
[which is better to use, apopost or apifox? Just read this!]
One click compilation and installation of redis6.2.4
PCL点云处理之随机采样抽稀RandomSample(六十)
Apipost signs up with Chinatelecom! Work together to accelerate the digital transformation of enterprises
Flex layout
Poj2308 continuously look at dfs+bfs+ optimization
C # use SQLite
工程项目管理软件排名
Morris遍历
Time series data in industrial Internet of things
PHP get thumbnails
EL & JSTL: JSTL summary
CAD break command