当前位置:网站首页>物联网平台返回数据解析时遇到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异常。
边栏推荐
- AC自动机
- IndexTree2D
- 【数据库学习】Redis 解析器&&单线程&&模型
- 有序表之AVL树
- GB、MB、KB分别是什么意思。大小分别是多少
- [Apipost和Apifox哪个更好用?看这篇就够了!]
- [cloud native kubernetes] kubernetes cluster advanced resource object staterulesets
- Shallow copy deep copy
- 【云原生之kubernetes】kubernetes集群高级资源对象statefulesets
- From Fibonacci sequence to matrix fast power technique
猜你喜欢

暴力递归——N皇后详解 && 如何用位运算进行优化

PCL点云处理之平面规则化(五十五)

Archsummit: evolution of the underlying framework of cherished microservices

Visual studio input! No prompt
![[postgraduate entrance examination vocabulary training camp] day 12 - native, separate, figure, contribution, categories, assessment, propose](/img/6e/97e9335b7017e6e40d248252493e80.png)
[postgraduate entrance examination vocabulary training camp] day 12 - native, separate, figure, contribution, categories, assessment, propose

Integrated swagger learning

C # use SQLite
![[postgraduate entrance examination English vocabulary training camp] day 11 - offer, form, maintain, critical](/img/49/360222c3528ee527b4ca659b0ec669.png)
[postgraduate entrance examination English vocabulary training camp] day 11 - offer, form, maintain, critical

SVM - for linear separability (Part 2)

Implement redis sentinel to simulate master failure scenarios
随机推荐
在机器人行业的专业人士眼里,机器人行业目前的情况如何?
Local data enhancement method of icml2022 | graph neural network
GlideModule AppGlideModule和Generated API详解
Monotonic stack structure
[database learning] redis parser & single thread & Model
工业物联网中的时序数据
What is a video content recommendation engine?
IndexTree2D
Icassp 2022 | KS transformer for multimodal emotion recognition
Violent recursion - detailed explanation of Queen n & how to optimize with bit operation
PCL point cloud processing to find the two endpoints of the line point set (57)
Push information to wechat through enterprise wechat self built application
AC自动机
PCL点云处理之移动最小二乘拟合实验(六十二)
由斐波那契数列引述到矩阵快速幂技巧
Brainstorming -- using reduce method to reconstruct concat function
Use kettle to read the data in Excel file and store it in MySQL
Im instant messaging develops ten million level concurrent long connection Gateway Technology
Ue5 reports an error using the plug-in quixel Bridge
Cell专刊|AI在蛋白结构、精准医疗、抗体疗法[综述]等的应用与未来预测