org.json.simple
Class JSONObject

java.lang.Object
  extended by java.util.AbstractMap<S,T>
      extended by org.gudy.azureus2.core3.util.LightHashMap<String,Object>
          extended by org.json.simple.JSONObject
All Implemented Interfaces:
Cloneable, Map<String,Object>

public class JSONObject
extends LightHashMap<String,Object>

Author:
FangYidong

Nested Class Summary
 
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
 
Nested classes/interfaces inherited from interface java.util.Map
Map.Entry<K,V>
 
Constructor Summary
JSONObject()
           
JSONObject(int initialCapacity)
           
JSONObject(int initialCapacity, float loadFactor)
           
JSONObject(Map<String,Object> arg0)
           
 
Method Summary
static String escape(String s)
          " => \" , \ => \\
static void escape(StringBuilder sb, String s)
           
 String toString()
           
 void toString(StringBuilder sb)
           
static void toString(StringBuilder sb, String key, Object value)
           
static String toString(String key, Object value)
           
 
Methods inherited from class org.gudy.azureus2.core3.util.LightHashMap
capacity, clear, clone, compactify, containsKey, containsValue, entrySet, get, keySet, main, put, putAll, remove, values
 
Methods inherited from class java.util.AbstractMap
equals, hashCode, isEmpty, size
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JSONObject

public JSONObject()

JSONObject

public JSONObject(int initialCapacity,
                  float loadFactor)

JSONObject

public JSONObject(int initialCapacity)

JSONObject

public JSONObject(Map<String,Object> arg0)
Method Detail

toString

public String toString()
Overrides:
toString in class AbstractMap<String,Object>

toString

public void toString(StringBuilder sb)

toString

public static String toString(String key,
                              Object value)

toString

public static void toString(StringBuilder sb,
                            String key,
                            Object value)

escape

public static String escape(String s)
" => \" , \ => \\

Parameters:
s -
Returns:

escape

public static void escape(StringBuilder sb,
                          String s)