public class JSONArray extends Object
| 构造器和说明 |
|---|
JSONArray() |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
add(Object ele)
add item.
|
void |
addAll(Collection<?> c)
add items.
|
void |
addAll(Object[] eles)
add items.
|
Object |
get(int index)
get.
|
JSONArray |
getArray(int index)
get JSONArray value.
|
boolean |
getBoolean(int index,
boolean def)
get boolean value.
|
double |
getDouble(int index,
double def)
get double value.
|
float |
getFloat(int index,
float def)
get float value.
|
int |
getInt(int index,
int def)
get int value.
|
long |
getLong(int index,
long def)
get long value.
|
JSONObject |
getObject(int index)
get JSONObject value.
|
String |
getString(int index)
get string value.
|
int |
length()
get array length.
|
void |
writeJSON(JSONConverter jc,
JSONWriter jb,
boolean writeClass)
write json.
|
public Object get(int index)
index - index.public boolean getBoolean(int index,
boolean def)
index - index.def - default value.public int getInt(int index,
int def)
index - index.def - default value.public long getLong(int index,
long def)
index - index.def - default value.public float getFloat(int index,
float def)
index - index.def - default value.public double getDouble(int index,
double def)
index - index.def - default value.public String getString(int index)
index - index.public JSONArray getArray(int index)
index - index.public JSONObject getObject(int index)
index - index.public int length()
public void add(Object ele)
public void addAll(Object[] eles)
public void addAll(Collection<?> c)
public void writeJSON(JSONConverter jc, JSONWriter jb, boolean writeClass) throws IOException
jc - json converterjb - json builder.IOExceptionCopyright © 2012–2017 Alibaba. All rights reserved.