xlang v5.1 Release
程序设计语言基础库文档
载入中...
搜索中...
未找到
JsonArray.x
浏览该文件的文档.
1
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) // 抛出非法参数异常 // 获取整数值
55 public long getLong(int)
57 public double getDouble(int)
59 public bool getBool(int)
61 public @NotNilptr String getString(int)
63 public @NotNilptr JsonArray getArray(int)
65 public @NotNilptr JsonObject getObject(int)
67 public @NotNilptr JsonNode get(int)
69 public bool isNull(int)
71 public bool remove(int)
73 public void put(int, Object)
75 public void put(Object);
76 public int length();
77 public @NotNilptr Object [](int, Object)
79 public @NotNilptr Object [](int);
80};
String getString(int)
bool getBool(int)
static const int JSONTYPE_NUMBER
Definition JsonArray.x:10
String toString(bool)
void put(int, Object)
void finalize()
int length()
final int getType()
static const int JSONTYPE_STRING
Definition JsonArray.x:11
JsonNode next()
bool equals(JsonNode)
String getName()
JsonArray getArray(int)
bool isArray()
XmlObject asXml(String)
static const int JSONTYPE_ARRAY
Definition JsonArray.x:12
static const int JSONTYPE_BOOL
Definition JsonArray.x:8
static const int JSONTYPE_OBJECT
Definition JsonArray.x:13
JsonObject getObject(int)
JsonNode prev()
double getDouble(int)
static const int JSONTYPE_NULL
Definition JsonArray.x:9
Object(int, Object)
JsonArray(String)
String toString()
JsonNode clone()
bool isNull(int)
void put(Object)
long getLong(int)
int getInt(int)
JsonNode child()
Definition Object.x:1
Definition String.x:5