@Deprecated public static boolean contains(JSONArray json, Object element) { if (json == null || element == null) return false; for (int i = 0; i < json.length(); i++) try { if (elementsEqual(json.get(i), element)) return true; } catch (Exception e) { continue; } return false; }
@Deprecated public static boolean contains(JSONObject json, Object element) { if (json == null || element == null) return false; @SuppressWarnings("unchecked") final Iterator<String> keys = json.keys(); while (keys.hasNext()) try { if (elementsEqual(json.get(keys.next()), element)) return true; } catch (Exception e) { continue; } return false; }