Bundle
dsh-json-csv
CSV ↔ JSON 转换:JSON 对象数组转 CSV,CSV 解析为 JSON
- Source
- uckkk
- License
- MIT
- Updated
- Updated 4 days ago
Readme
# dsh-json-csv · CSV ↔ JSON 转换
JSON 对象数组 ↔ CSV 互转,支持表头与引号转义。纯 Node 实现。
## 提供的工具
| 工具 | 作用 |
|---|---|
| `json_to_csv` | JSON 数组 → CSV |
| `csv_to_json` | CSV → JSON 数组 |
## 安装
```bash
dsh plugin add dsh-json-csv
```
安装后在 profile 的 `package.json` 的 `dsh.profile.bundles` 中加入 `"dsh-json-csv"`。
## 用法示例
```
把这组数据导出成 CSV
→ 调用 json_to_csv(data=[{a:1,b:2},{a:3,b:4}])
```
## 安装
```bash
dsh plugin add github:uckkk/dsh-json-csv
```
> 安装即在本机运行第三方代码,请自行审阅源码。
## 安装
```bash
dsh plugin add github:uckkk/dsh-json-csv
```
## 使用
安装后在会话中调用该插件注册的工具即可。
## 许可
MIT
> 安装即在本机运行第三方代码,请自行审阅源码。
Install
dsh plugin --profile web add github:uckkk/dsh-json-csv
Profile: web
With the hub plugin installed, ask your agent to install it by name — it resolves the same plan shown here.
dsh plugin --profile web add github:stvlynn/dsh.fish#path:packages/dsh-plugin-hub
install dsh-json-csv from the hub
- This source has no pinned commit, so a later push upstream changes what installs. Prefer pinning a commit.