|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.AbstractMap<K,V>
java.util.HashMap<String,Object>
net.minidev.json.JSONObject
public class JSONObject
A JSON object. Key value pairs are unordered. JSONObject supports java.util.Map interface.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class java.util.AbstractMap |
|---|
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V> |
| Constructor Summary | |
|---|---|
JSONObject()
|
|
JSONObject(Map<String,?> map)
Allows creation of a JSONObject from a Map. |
|
| Method Summary | ||
|---|---|---|
|
cast()
Allow simply casting to Map |
|
static String |
escape(String s)
Escape quotes, \, /, \r, \n, \b, \f, \t and other control characters (U+0000 through U+001F). |
|
protected static JSONArray |
merge(JSONArray o1,
Object o2)
|
|
protected static JSONObject |
merge(JSONObject o1,
Object o2)
|
|
void |
merge(Object o2)
|
|
String |
toJSONString()
|
|
static String |
toJSONString(Map<String,Object> map)
Convert a map to JSON text. |
|
String |
toString()
|
|
static String |
toString(String key,
Object value)
|
|
void |
writeJSONString(Appendable out)
serialize Object as json to an stream |
|
static void |
writeJSONString(Map<String,Object> map,
Appendable out)
Encode a map into JSON text and write it to out. |
|
| Methods inherited from class java.util.HashMap |
|---|
clear, clone, containsKey, containsValue, entrySet, get, isEmpty, keySet, put, putAll, remove, size, values |
| Methods inherited from class java.util.AbstractMap |
|---|
equals, hashCode |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.util.Map |
|---|
equals, hashCode |
| Constructor Detail |
|---|
public JSONObject()
public JSONObject(Map<String,?> map)
| Method Detail |
|---|
public <T> T cast()
public static String escape(String s)
JSONValue.escape(String)public static String toJSONString(Map<String,Object> map)
JSONValue.toJSONString(Object)
public static String toString(String key,
Object value)
public static void writeJSONString(Map<String,Object> map,
Appendable out)
throws IOException
IOExceptionJSONValue.writeJSONString(Object, Appendable)
public void writeJSONString(Appendable out)
throws IOException
IOExceptionpublic void merge(Object o2)
protected static JSONObject merge(JSONObject o1,
Object o2)
protected static JSONArray merge(JSONArray o1,
Object o2)
public String toJSONString()
toJSONString in interface JSONAwarepublic String toString()
toString in class AbstractMap<String,Object>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||