|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.aelitis.azureus.util.JSONUtils
public class JSONUtils
Constructor Summary | |
---|---|
JSONUtils()
|
Method Summary | |
---|---|
static java.util.Map |
decodeJSON(java.lang.String json)
decodes JSON formatted text into a map. |
static java.lang.String |
encodeToJSON(java.util.Collection list)
|
static java.lang.String |
encodeToJSON(java.util.Map map)
Encodes a map into a JSON formatted string. |
static JSONObject |
encodeToJSONObject(java.util.Map map)
encodes a map into a JSONObject. |
static void |
main(java.lang.String[] args)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JSONUtils()
Method Detail |
---|
public static java.util.Map decodeJSON(java.lang.String json)
If the json text is not a map, a map with the key "value" will be returned. the value of "value" will either be an List, String, Number, Boolean, or null
if the String is formatted badly, null is returned
public static JSONObject encodeToJSONObject(java.util.Map map)
It's recommended that you use encodeToJSON(Map)
instead
map
-
public static java.lang.String encodeToJSON(java.util.Map map)
Handles multiple layers of Maps and Lists. Handls String, Number, Boolean, and null values.
map
- Map to change into a JSON formatted string
public static java.lang.String encodeToJSON(java.util.Collection list)
public static void main(java.lang.String[] args)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |