Commit c65275db5de9c001fe23a10b8d8c1539ef9a3506
1 parent
e8cd979b
Exists in
master
1.fix a bug when json has null
Showing
2 changed files
with
3 additions
and
3 deletions
Show diff stats
build.gradle
src/main/java/com/taover/util/UtilJSON.java
| ... | ... | @@ -49,7 +49,7 @@ public class UtilJSON { |
| 49 | 49 | } |
| 50 | 50 | for(int i=0; i<dataArr.size(); ++i){ |
| 51 | 51 | JSONObject dataItem = dataArr.optJSONObject(i); |
| 52 | - if(dataItem.isNullObject()){ | |
| 52 | + if(isJsonNull(dataItem)){ | |
| 53 | 53 | dataArr.remove(i); |
| 54 | 54 | continue; |
| 55 | 55 | } |
| ... | ... | @@ -87,7 +87,7 @@ public class UtilJSON { |
| 87 | 87 | } |
| 88 | 88 | for(int i=0; i<dataArr.size(); ++i){ |
| 89 | 89 | JSONObject dataItem = dataArr.optJSONObject(i); |
| 90 | - if(dataItem.isNullObject()){ | |
| 90 | + if(isJsonNull(dataItem)){ | |
| 91 | 91 | dataArr.set(i, target); |
| 92 | 92 | continue; |
| 93 | 93 | } | ... | ... |