判断json对象时JSONArray还是JSONObject

使用的fastjson

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

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-01-04
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-12-21
  • 2022-12-23
  • 2022-12-23
  • 2021-06-24
  • 2021-06-18
  • 2022-02-19
相关资源
相似解决方案