当前位置:网站首页>物联网平台返回数据解析时遇到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异常。
边栏推荐
- From violent recursion to dynamic programming, memory search
- Visual studio input! No prompt
- 基于深度学习的多任务人脸属性分析(基于飞桨PaddlePaddle)
- SQL语言的通用语法及分类(二)
- Web3 security go + security
- Ue5 reports an error using the plug-in quixel Bridge
- 洛谷 P2024 [NOI2001] 食物链
- Multi task face attribute analysis based on deep learning (based on paddlepaddle)
- The kettle job implementation runs a kettle conversion task every 6S
- 有序表之AVL树
猜你喜欢

Homework of the 20th week
![洛谷 P2024 [NOI2001] 食物链](/img/7f/6ccbc19942f0d4a153025346496834.png)
洛谷 P2024 [NOI2001] 食物链
![[database learning] redis parser & single thread & Model](/img/70/c84eb02d45e35fede4dd1b1ff04392.png)
[database learning] redis parser & single thread & Model

Application programming of communication heartbeat signal for communication abnormality judgment

从暴力递归到动态规划,记忆化搜索

ICML2022 | 图神经网络的局域数据增强方法

Maixll dock QR code recognition

AC自动机

IndexTree2D

The kettle job implementation runs a kettle conversion task every 6S
随机推荐
PCL point cloud processing to find the two endpoints of the line point set (57)
AC自动机
ASP.NET Core 6.0 基于模型验证的数据验证
工业物联网中的时序数据
Projection regularization of line point set in PCL point cloud processing (56)
Web3 security go + security
Sensor experiment - 485 air temperature and humidity
洛谷 P2024 [NOI2001] 食物链
Gradle learning - gradle advanced instructions
Glidemodule appglidemodule and generated API details
【数据库学习】Redis 解析器&&单线程&&模型
PHP get thumbnails
Function default parameter pit avoidance Guide
并查集结构
Ranking of engineering project management software
Which is the best interface documentation tool at home and abroad?
Use kettle to read the data in Excel file and store it in MySQL
实现redis哨兵,模拟master故障场景
Luogu p2024 [noi2001] food chain
C # use SQLite