- 1 为什么开发ZenData
- 2 ZenData数据生成工具简介
- 3 如何获得支持
-
4. 快速入门
- 4.1 安装部署
- 4.2 将ZenData加入$PATH系统环境变量中
- 4.3 命令行参数说明
- 4.4 命令行调用示例
- 4.5 內置数据定义示例
- 4.6 YAML定义语法总览
-
5. 用户指南
- 5.1. 数据定义语法
- 5.2. 內置数据定义
- 5.3. 用户数据自定义
-
5.4. 数据定义引用
- 5.4.1 引用ranges系列
- 5.4.2 引用instances实例
- 5.4.3 多froms联合引用
- 5.4.4 引用Config配置
- 5.4.5 引用yaml文件内容
- 5.4.6 全局from语句
- 5.5. 数据输出格式
-
5.6. ZenData命令详细介绍
- 5.6.1 Default配置覆盖
- 5.6.2 列出內置数据
- 5.6.3 查看內置数据
- 5.6.4 从SQL生成数据定义
- 5.6.5 清除数据前后缀
- 5.6.6 数据反向解析
-
5.7. ZenData文章生成器
- 5.7.1 中文词语基础数据
- 5.7.2 转换文章到YAML配置
- 5.7.3 文章格式语法介绍
- 5.7.4 从YAML配置生成新文章
- 5.8. ZenData Web服务
- 6. 内置数据一览
JSON格式输出
- 2020-08-13 09:05:30
- 陈琦
- 792
- 最后编辑:陈琦 于 2021-04-14 14:44:48
- 分享链接
通过指定-o参数的文件扩展名为json,我们可以输出JSON 格式的数据 文件 。
zd.exe -d demo\default.yaml -c demo\test.yaml -n 3 -o demo\output\default.json
生成的JSON内容如下:
[ { "field_common": "int_1\t", "field_file": "ben\t", "field_format": "passwd01\t", "field_loop": "[a_b_c]", "field_loop_range": "[1|1]\t", "field_nested_instant": "[10.0.0.1/'8'}", "field_nested_range": "['101']", "field_random": "9\t", "field_repeat": "user-1\t", "field_step": "1\t", "field_use_another_file": "'100,101'\t", "field_use_excel": " [济南市]", "field_use_instance": "192.168.0.1]", "field_use_ranges": "'101'\t", "field_with_children": " [part1_a|part2_A|part3_int_10] " }, { "field_common": "int_2\t", "field_file": "aaron\t", "field_format": "passwd02\t", "field_loop": "[d_e_f]", "field_loop_range": "[1|2|2]\t", "field_nested_instant": "[10.1.1.2/'16'}", "field_nested_range": "['102']", "field_random": "8\t", "field_repeat": "user-1\t", "field_step": "3\t", "field_use_another_file": "'102,103'\t", "field_use_excel": " [青岛市]", "field_use_instance": "192.168.1.2]", "field_use_ranges": "'102'\t", "field_with_children": " [part1_b|part2_B|part3_int_11] " }, { "field_common": "int_3\t", "field_file": "carl\t", "field_format": "passwd03\t", "field_loop": "[g_h_i]", "field_loop_range": "[2|3]\t", "field_nested_instant": "[10.2.2.3/'24'}", "field_nested_range": "['103']", "field_random": "1\t", "field_repeat": "user-1\t", "field_step": "5\t", "field_use_another_file": "'104,105'\t", "field_use_excel": " [淄博市]", "field_use_instance": "192.168.2.3]", "field_use_ranges": "'103'\t", "field_with_children": " [part1_c|part2_C|part3_int_12] " } ]
发表评论
- 刘斌
- 17685869372
- 526288068
- liubin@easycorp.ltd