So I am receiving, a jsonobject from an api call.
inside the jsonobject there is a field that can hold an array of JSONObjects
for example
{ "order":[]}
how can I check if the array is empty or not?
JSONSimple library
JSONObject[] check = new JSONObject[0];
JSONObject g = new JSONObject();
g.put("test", check);
System.out.println(((List<JSONObject>)g.get("test")).size());
Actual result: error
Desired result: size of json[]
Thanks