xlang
v5.1 Release
程序设计语言基础库文档
载入中...
搜索中...
未找到
JsonArray.x
浏览该文件的文档.
1
5
class
JsonArray
:
JsonNode
{
6
7
// JSON类型常量定义,用于标识不同的JSON数据类型
8
public
static
const
int
JSONTYPE_BOOL
;
// JSON布尔类型,用于表示true或false值
9
public
static
const
int
JSONTYPE_NULL
;
// JSON空值类型,用于表示null值
10
public
static
const
int
JSONTYPE_NUMBER
;
// JSON数字类型,用于表示数值
11
public
static
const
int
JSONTYPE_STRING
;
// JSON字符串类型,用于表示文本数据
12
public
static
const
int
JSONTYPE_ARRAY
;
// JSON数组类型,用于表示数组结构
13
public
static
const
int
JSONTYPE_OBJECT
;
// JSON对象类型,用于表示键值对结构
14
15
16
// 基本属性检查方法,用于验证节点的类型
17
public
bool
isArray
();
// 检查是否为数组类型
18
19
20
// 节点遍历相关方法
21
public
@NotNilptr
JsonNode
next
();
// 获取下一个节点
22
public
@NotNilptr
JsonNode
prev
();
// 获取前一个节点
23
public
@NotNilptr
JsonNode
child
();
// 获取子节点
24
25
26
// 节点信息获取方法
27
public
@NotNilptr
String
getName
();
// 获取节点名称
28
public
@NotNilptr
JsonNode
clone
();
// 克隆节点
29
public
final
int
getType
();
// 获取节点类型
30
public
bool
equals
(
JsonNode
);
// 比较节点是否相等
31
32
33
// 字符串转换方法
34
public
@NotNilptr
String
toString
(
bool
);
// 转换为字符串,可格式化
35
public
@NotNilptr
String
toString
();
// 转换为字符串
36
37
38
// 析构方法
39
public
void
finalize
();
// 析构函数
40
41
42
// XML转换方法
43
public
@NotNilptr
XmlObject
asXml
(
String
);
// 转换为XML对象
44
45
46
// 构造函数
47
public
JsonArray
();
// 默认构造函数
48
public
JsonArray
(
String
)
// 带参数的构造函数
49
throws
IllegalArgumentException
;
// 抛出非法参数异常
50
51
52
// 数值获取方法
53
public
int
getInt
(
int
)
// 抛出非法参数异常 // 获取整数值
54
throws
IllegalArgumentException
;
55
public
long
getLong
(
int
)
56
throws
IllegalArgumentException
;
57
public
double
getDouble
(
int
)
58
throws
IllegalArgumentException
;
59
public
bool
getBool
(
int
)
60
throws
IllegalArgumentException
;
61
public
@NotNilptr
String
getString
(
int
)
62
throws
IllegalArgumentException
;
63
public
@NotNilptr
JsonArray
getArray
(
int
)
64
throws
IllegalArgumentException
;
65
public
@NotNilptr
JsonObject
getObject
(
int
)
66
throws
IllegalArgumentException
;
67
public
@NotNilptr
JsonNode
get
(int)
68
throws
IllegalArgumentException
;
69
public
bool
isNull
(
int
)
70
throws
IllegalArgumentException
;
71
public
bool
remove
(int)
72
throws
IllegalArgumentException
;
73
public
void
put
(
int
,
Object
)
74
throws
IllegalArgumentException
;
75
public
void
put
(
Object
);
76
public
int
length
();
77
public
@NotNilptr
Object
[](int,
Object
)
78
throws
IllegalArgumentException
;
79
public
@NotNilptr
Object
[](int);
80
};
IllegalArgumentException
Definition
IllegalArgumentException.x:5
JsonArray
Definition
JsonArray.x:5
JsonArray.getString
String getString(int)
JsonArray.getBool
bool getBool(int)
JsonArray.JSONTYPE_NUMBER
static const int JSONTYPE_NUMBER
Definition
JsonArray.x:10
JsonArray.toString
String toString(bool)
JsonArray.put
void put(int, Object)
JsonArray.finalize
void finalize()
JsonArray.length
int length()
JsonArray.getType
final int getType()
JsonArray.JSONTYPE_STRING
static const int JSONTYPE_STRING
Definition
JsonArray.x:11
JsonArray.next
JsonNode next()
JsonArray.equals
bool equals(JsonNode)
JsonArray.getName
String getName()
JsonArray.getArray
JsonArray getArray(int)
JsonArray.isArray
bool isArray()
JsonArray.asXml
XmlObject asXml(String)
JsonArray.JSONTYPE_ARRAY
static const int JSONTYPE_ARRAY
Definition
JsonArray.x:12
JsonArray.JSONTYPE_BOOL
static const int JSONTYPE_BOOL
Definition
JsonArray.x:8
JsonArray.JSONTYPE_OBJECT
static const int JSONTYPE_OBJECT
Definition
JsonArray.x:13
JsonArray.getObject
JsonObject getObject(int)
JsonArray.JsonArray
JsonArray()
JsonArray.prev
JsonNode prev()
JsonArray.getDouble
double getDouble(int)
JsonArray.JSONTYPE_NULL
static const int JSONTYPE_NULL
Definition
JsonArray.x:9
JsonArray.Object
Object(int, Object)
JsonArray.JsonArray
JsonArray(String)
JsonArray.toString
String toString()
JsonArray.clone
JsonNode clone()
JsonArray.isNull
bool isNull(int)
JsonArray.put
void put(Object)
JsonArray.getLong
long getLong(int)
JsonArray.getInt
int getInt(int)
JsonArray.child
JsonNode child()
JsonNode
Definition
JsonNode.x:5
JsonObject
Definition
JsonObject.x:5
Object
Definition
Object.x:1
String
Definition
String.x:5
XmlObject
Definition
XmlObject.x:5
std
JsonArray.x
制作者
1.9.8