# readJson-读取JSON
调用readJson函数读取Json信息生成增强数据表。
最小支持版本:5.6.0
# 语法
DataFrame.readJson(<buf>, records, {})
1
DataFrame.读取JSON(<buf>, records, {})
1
# 函数类型
静态函数
# 请求参数
参数名称 | 类型 | 是否必选 | 默认值 | 示例值 | 描述 |
---|---|---|---|---|---|
buf | Cube.Object | 是 | 无 | "D:\test.json" | Json源,可以为json字符串、文件路径、文件对象任意一种。 |
orient | Cube.Lang.String | 是 | records | "index" | 朝向。 split: {index -> [index], columns -> [columns], data -> [values]} 的字典格式records: [{column -> value}, ... , {column -> value}] 的列表格式index: {index -> {column -> value}} 的字典格式columns: {column -> {index -> value}} 的字典格式values: 仅值的列表 |
options | Cube.Lang.KeyValue | 是 | {} | {"typ":"series"} | 可选参数。详参见pandas官方文档 (opens new window)。 |
# 返回参数
参数名称 | 类型 | 示例值 | 描述 |
---|---|---|---|
Result | Cube.System.DataFrame | Cube.System.DataFrame | 从Json生成的增强数据表。 |
# 请求示例
DataFrame.readJson("D:\\test.json")
1
最近更新时间: {
"value": "2023-09-12",
"effect": true
}