net.rim.device.api.io.parser.json
Class JSONHashtable
java.lang.Object
java.util.Hashtable
net.rim.device.api.io.parser.ObjectPathHashtableBase
net.rim.device.api.io.parser.json.JSONHashtable
- All Implemented Interfaces:
- ObjectPathHashtable, Persistable
public class JSONHashtable
- extends ObjectPathHashtableBase
This class allows a user to access a JSON object tree using a Hashtable interface. The entire JSON is
read and the leaf nodes are inserted into this JSONHashtable. Additional methods are provided to convert
return values into specific types, if desired, via the ObjectPathHashtable interface.
- Since:
- BlackBerry API 6.0.0
| Methods inherited from class net.rim.device.api.io.parser.ObjectPathHashtableBase |
addString, getBoolean, getBoolean, getBooleanArray, getBooleanAt, getBooleanAt, getByte, getByte, getByteArray, getByteAt, getByteAt, getDouble, getDouble, getDoubleArray, getDoubleAt, getDoubleAt, getFloat, getFloat, getFloatArray, getFloatAt, getFloatAt, getInteger, getInteger, getInteger, getIntegerArray, getIntegerAt, getIntegerAt, getIntegerAt, getLong, getLong, getLongArray, getLongAt, getLongAt, getNumKeys, getNumValues, getShort, getShort, getShortArray, getShortAt, getShortAt, getString, getString, getStringArray, getStringAt, getStringAt |
| Methods inherited from class java.util.Hashtable |
clear, contains, containsKey, elements, get, isEmpty, keys, put, rehash, remove, size, toString |
JSONHashtable
public JSONHashtable(JSONObject jsonObject)
throws JSONException
- Constructs a
JSONHashtable from a JSONObject. Recursively walks through the attributes of
the JSONObject and adds the value at each leaf node into a Hashtable with a key that
represents the path to that node. Some examples of keys are /person, /person/name, /person/friends/3/firstName.
- Parameters:
jsonObject - The source of the data for the Hashtable.
- Throws:
JSONException - If there is a problem accessing data in the JSONObject.- Since:
- BlackBerry API 6.0.0
JSONHashtable
public JSONHashtable(JSONArray jsonArray)
throws JSONException
- Constructs a
JSONHashtable from a JSONArray. Recursively walks through the entries in the
JSONArray and adds the value at each leaf node into the Hashtable with a key that represents
the path to that node. Some examples of keys are /0/person, /1/person/name, /2/person/friends/3/firstName.
- Parameters:
jsonArray - The source of the data for the Hashtable.
- Throws:
JSONException - If there is a problem accessing data in the JSONArray.- Since:
- BlackBerry API 6.0.0
Copyright 1999-2011 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Java is a trademark of Oracle America Inc. in the US and other countries.
Legal