Package top.focess.qq.api.util.json
Class JSONList
- java.lang.Object
-
- top.focess.qq.api.util.json.JSONObject
-
- top.focess.qq.api.util.json.JSONList
-
public class JSONList extends JSONObject
This class is used to define a JSON object as List.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> Tget(int index)Get the value at the given indexJSONgetJSON(int index)Get as JSON at the given indexJSONListgetList(int index)Get the list at the given indexList<?>getValues()StringtoJson()Translate this JSON instance into json StringStringtoString()-
Methods inherited from class top.focess.qq.api.util.json.JSONObject
get, getList, parse
-
-
-
-
Method Detail
-
get
public <T> T get(int index)
Description copied from class:JSONObjectGet the value at the given indexNote: this is for JSONList only.
- Overrides:
getin classJSONObject- Type Parameters:
T- the type of the value- Parameters:
index- the index of the value- Returns:
- the value at the given index
-
getJSON
public JSON getJSON(int index)
Description copied from class:JSONObjectGet as JSON at the given indexNote: this is for JSONList only.
- Overrides:
getJSONin classJSONObject- Parameters:
index- the index of the JSON- Returns:
- the JSON at the given index
-
getList
public JSONList getList(int index)
Description copied from class:JSONObjectGet the list at the given indexNote: this is for JSONList only.
- Overrides:
getListin classJSONObject- Parameters:
index- the index of the list- Returns:
- the list at the given index
-
getValues
public List<?> getValues()
-
toJson
public String toJson()
Description copied from class:JSONObjectTranslate this JSON instance into json String- Specified by:
toJsonin classJSONObject- Returns:
- json String translated from this JSON instance
-
-