public class JSONObject
extends java.util.HashMap
Constructor and Description |
---|
JSONObject() |
JSONObject(java.util.Map map) |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
escape(java.lang.String s)
Escape quotes, \, /, \r, \n, \b, \f, \t and other control characters
(U+0000 through U+001F).
|
static java.lang.String |
toJSONString(java.util.Map<?,?> map)
Convert a map to JSON text.
|
static java.lang.String |
toString(java.lang.String key,
java.lang.Object value) |
static void |
writeJSONString(java.util.Map<?,?> map,
java.io.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, values
public static void writeJSONString(java.util.Map<?,?> map, java.io.Writer out) throws java.io.IOException
java.io.IOException
JSONValue.writeJSONString(Object, Writer)
public static java.lang.String toJSONString(java.util.Map<?,?> map)
JSONValue.toJSONString(Object)
public static java.lang.String toString(java.lang.String key, java.lang.Object value)
public static java.lang.String escape(java.lang.String s)
JSONValue.escape(String)
Copyright © 2014. All Rights Reserved.