判断json对象时JSONArray还是JSONObject

时间:2020-11-24 12:28:00   收藏:0   阅读:142

判断json对象时JSONArray还是JSONObject

使用的fastjson

Object object = js.get("guid");
 if (object instanceof JSONArray) {
    System.out.println("JSONArray");
}else{
    System.out.println("JSONObject");
}

 

原文:https://www.cnblogs.com/baby123/p/14029354.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!