Function json_stringify
Source pub fn json_stringify(args: &[Value]) -> Result<Value, RuntimeError>
Expand description
将 Aether 值序列化为 JSON 字符串
将 Aether 数据结构转换为 JSON 格式的字符串。
value: 要序列化的值
indent: (可选)缩进空格数,默认为 0(紧凑格式)
§返回值
JSON 格式的字符串
Set OBJ {"name": "Alice", "age": 30}
Set JSON_STR JSON_STRINGIFY(OBJ)
Println(JSON_STR) # 输出: {"name":"Alice","age":30}
# 格式化输出(2空格缩进)
Set PRETTY JSON_STRINGIFY(OBJ, 2)