JSONObject (fastjson 1.1.26 API)

fastjson



com.alibaba.fastjson Class JSONObject

java.lang.Object
  extended by com.alibaba.fastjson.JSON
      extended by com.alibaba.fastjson.JSONObject
All Implemented Interfaces:
JSONAware, JSONStreamAware, Serializable, Cloneable, InvocationHandler, Map<String,Object>

public class JSONObject
extends JSON
implements Map<String,Object>, JSONAware, Cloneable, Serializable, InvocationHandler

Author:
wenshao
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface java.util.Map
 
Field Summary
 
Fields inherited from class com.alibaba.fastjson.JSON
 
Constructor Summary
 
Method Summary
 void
 Object
 boolean
 boolean
 Set<Map.Entry<String,Object>>
 boolean
 Object
 BigDecimal
 BigInteger
 Boolean
 boolean
 Byte
 byte[]
 byte
 Date
 Double
 double
 Float
 float
 Integer
 int
 JSONArray
 JSONObject
 Long
 long
<T> T
getObject(String key, Class<T> clazz)
             Short getShort(String key)
             short getShortValue(String key)
             Date getSqlDate(String key)
             String getString(String key)
             Timestamp getTimestamp(String key)
             int hashCode()
             Object invoke(Object proxy, Method method, Object[] args)
             boolean isEmpty()
             Set<String> keySet()
             Object put(String key, Object value)
             void putAll(Map<? extends String,? extends Object> m)
             Object remove(Object key)
             int size()
             Collection<Object> values()
             
Methods inherited from class com.alibaba.fastjson.JSON
 
Methods inherited from class java.lang.Object
 
Methods inherited from interface com.alibaba.fastjson.JSONAware
 

Constructor Detail

JSONObject

public JSONObject()

JSONObject

public JSONObject(Map<String,Object> map)

JSONObject

public JSONObject(boolean ordered)

JSONObject

public JSONObject(int initialCapacity)

JSONObject

public JSONObject(int initialCapacity,
                  boolean ordered)
Method Detail

size

public int size()
Specified by:
size in interface Map<String,Object>

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface Map<String,Object>

containsKey

public boolean containsKey(Object key)
Specified by:
containsKey in interface Map<String,Object>

containsValue

public boolean containsValue(Object value)
Specified by:
containsValue in interface Map<String,Object>

get

public Object get(Object key)
Specified by:
get in interface Map<String,Object>

getJSONObject

public JSONObject getJSONObject(String key)

getJSONArray

public JSONArray getJSONArray(String key)

getObject

public <T> T getObject(String key,
                       Class<T> clazz)

getBoolean

public Boolean getBoolean(String key)

getBytes

public byte[] getBytes(String key)

getBooleanValue

public boolean getBooleanValue(String key)

getByte

public Byte getByte(String key)

getByteValue

public byte getByteValue(String key)

getShort

public Short getShort(String key)

getShortValue

public short getShortValue(String key)

getInteger

public Integer getInteger(String key)

getIntValue

public int getIntValue(String key)

getLong

public Long getLong(String key)

getLongValue

public long getLongValue(String key)

getFloat

public Float getFloat(String key)

getFloatValue

public float getFloatValue(String key)

getDouble

public Double getDouble(String key)

getDoubleValue

public double getDoubleValue(String key)

getBigDecimal

public BigDecimal getBigDecimal(String key)

getBigInteger

public BigInteger getBigInteger(String key)

getString

public String getString(String key)

getDate

public Date getDate(String key)

getSqlDate

public Date getSqlDate(String key)

getTimestamp

public Timestamp getTimestamp(String key)

put

public Object put(String key,
                  Object value)
Specified by:
put in interface Map<String,Object>

putAll

public void putAll(Map<? extends String,? extends Object> m)
Specified by:
putAll in interface Map<String,Object>

clear

public void clear()
Specified by:
clear in interface Map<String,Object>

remove

public Object remove(Object key)
Specified by:
remove in interface Map<String,Object>

keySet

public Set<String> keySet()
Specified by:
keySet in interface Map<String,Object>

values

public Collection<Object> values()
Specified by:
values in interface Map<String,Object>

entrySet

public Set<Map.Entry<String,Object>> entrySet()
Specified by:
entrySet in interface Map<String,Object>

clone

public Object clone()
Overrides:
clone in class Object

equals

public boolean equals(Object obj)
Specified by:
equals in interface Map<String,Object>
Overrides:
equals in class Object

hashCode

public int hashCode()
Specified by:
hashCode in interface Map<String,Object>
Overrides:
hashCode in class Object

invoke

public Object invoke(Object proxy,
                     Method method,
                     Object[] args)
              throws Throwable
Specified by:
invoke in interface InvocationHandler
Throws:
Throwable


Copyright © 2012 Alibaba Group. All Rights Reserved.