public class JSONObject<K,V> extends LinkedHashMap<K,V> implements Map<K,V>, JSONAware
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
Constructor and Description |
---|
JSONObject() |
JSONObject(int initialCapacity) |
JSONObject(int initialCapacity,
float loadFactor) |
JSONObject(int initialCapacity,
float loadFactor,
boolean accessOrder) |
JSONObject(K key,
V value) |
JSONObject(Map<? extends K,? extends V> m) |
Modifier and Type | Method and Description |
---|---|
String |
toJSONString()
Encodes this object to a JSON string.
|
static String |
toJSONString(Map map)
Convert (aka., encode) a map to JSON text.
|
String |
toString()
Encodes this object to a JSON string.
|
static String |
toString(String key,
Object value) |
clear, containsValue, entrySet, forEach, get, getOrDefault, keySet, removeEldestEntry, replaceAll, values
clone, compute, computeIfAbsent, computeIfPresent, containsKey, isEmpty, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, size
equals, hashCode
finalize, getClass, notify, notifyAll, wait, wait, wait
clear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, equals, forEach, get, getOrDefault, hashCode, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
public JSONObject()
public JSONObject(int initialCapacity, float loadFactor)
public JSONObject(int initialCapacity)
public JSONObject(int initialCapacity, float loadFactor, boolean accessOrder)
public static String toJSONString(Map map)
map
- JSONValue.toJSONString(Object)
public String toJSONString()
toString()
.toJSONString
in interface JSONAware
public String toString()
toJSONString()
.toString
in class AbstractMap<K,V>
Copyright © 2020. All rights reserved.