/** * Returns a java.util.Map containing all of the entries in this object. * If an entry in the object is a JSONArray or JSONObject it will also * be converted. * <p> * Warning: This method assumes that the data structure is acyclical. * * @return a java.util.Map containing the entries of this object */ public Map<String, Object> toMap() { Map<String, Object> results = new HashMap<String, Object>(); for (Entry<String, Object> entry : this.entrySet()) { Object value; if (entry.getValue() == null || NULL.equals(entry.getValue())) { value = null; } else if (entry.getValue() instanceof JSONObject) { value = ((JSONObject) entry.getValue()).toMap(); } else if (entry.getValue() instanceof JSONArray) { value = ((JSONArray) entry.getValue()).toList(); } else { value = entry.getValue(); } results.put(entry.getKey(), value); } return results; } }
for (final Entry<String, ?> entry : jo.entrySet()) { final String key = entry.getKey(); if (!"tagName".equals(key) && !"childNodes".equals(key)) {
for (final Entry<String, ?> entry : jo.entrySet()) { final String key = entry.getKey(); Object value = entry.getValue();
for (final Entry<String, ?> entry : jo.entrySet()) { final String key = entry.getKey(); XML.noSpace(key);
return false; for (final Entry<String,?> entry : this.entrySet()) { String name = entry.getKey(); Object valueThis = entry.getValue();
/** * Returns a java.util.Map containing all of the entries in this object. * If an entry in the object is a JSONArray or JSONObject it will also * be converted. * <p> * Warning: This method assumes that the data structure is acyclical. * * @return a java.util.Map containing the entries of this object */ public Map<String, Object> toMap() { Map<String, Object> results = new HashMap<String, Object>(); for (Entry<String, Object> entry : this.entrySet()) { Object value; if (entry.getValue() == null || NULL.equals(entry.getValue())) { value = null; } else if (entry.getValue() instanceof JSONObject) { value = ((JSONObject) entry.getValue()).toMap(); } else if (entry.getValue() instanceof JSONArray) { value = ((JSONArray) entry.getValue()).toList(); } else { value = entry.getValue(); } results.put(entry.getKey(), value); } return results; } }
return false; for (final Entry<String,?> entry : this.entrySet()) { String name = entry.getKey(); Object valueThis = entry.getValue();
JSONObject jsonRootObj = JSON.parseObject(completeJson); JSONObject a1 = jsonRootObj.getJSONObject("a1"); JSONObject a2 = jsonRootObj.getJSONObject("a2"); for (Map.Entry<String, Object> entry : a1.entrySet()) { if (a2.containsKey(entry.getKey())) { a2.put(entry.getKey(), entry.getValue()); } }
/** * Returns a java.util.Map containing all of the entries in this object. * If an entry in the object is a JSONArray or JSONObject it will also * be converted. * <p> * Warning: This method assumes that the data structure is acyclical. * * @return a java.util.Map containing the entries of this object */ public Map<String, Object> toMap() { Map<String, Object> results = new HashMap<String, Object>(); for (Entry<String, Object> entry : this.entrySet()) { Object value; if (entry.getValue() == null || NULL.equals(entry.getValue())) { value = null; } else if (entry.getValue() instanceof JSONObject) { value = ((JSONObject) entry.getValue()).toMap(); } else if (entry.getValue() instanceof JSONArray) { value = ((JSONArray) entry.getValue()).toList(); } else { value = entry.getValue(); } results.put(entry.getKey(), value); } return results; } }
while (iterator.hasNext()) { JSONObject jsonObject1 = ((JSONObject) iterator.next()); Iterator<? extends Map.Entry<Object, Object> > it = jsonObject1.entrySet().iterator(); while(it.hasNext()) { String name = null, enchantType = null;
return false; for (final Entry<String,?> entry : this.entrySet()) { String name = entry.getKey(); Object valueThis = entry.getValue();