public class JSONObject extends HashMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>| Constructor and Description |
|---|
JSONObject() |
JSONObject(Map map) |
| Modifier and Type | Method and Description |
|---|---|
static String |
escape(String s)
Escape quotes, \, /, \r, \n, \b, \f, \t and other control characters
(U+0000 through U+001F).
|
static String |
toJSONString(Map<?,?> map)
Convert a map to JSON text.
|
String |
toString() |
static String |
toString(String key,
Object value) |
static void |
writeJSONString(Map<?,?> map,
Writer out)
Encode a map into JSON text and write it to out.
|
clear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, get, getOrDefault, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, valuesequals, hashCodepublic JSONObject()
public JSONObject(Map map)
public static void writeJSONString(Map<?,?> map, Writer out) throws IOException
IOExceptionJSONValue.writeJSONString(Object, Writer)public static String toJSONString(Map<?,?> map)
JSONValue.toJSONString(Object)public String toString()
toString in class AbstractMappublic static String escape(String s)
JSONValue.escape(String)Copyright © 2019. All rights reserved.