dsh-json-to-rust
文件与数据 活跃维护

dsh-json-to-rust

uckkk/dsh-json-to-rust

输入JSON即可自动生成符合serde规范的Rust结构体定义,支持自定义字段命名、类型映射与属性配置,输出代码可直接集成到Rust项目,省去手动编写重复结构体的时间。

0
Stars 标星
0
Forks 分支
0
Watchers 关注
0
Open Issues
JavaScript
主要语言
MIT
开源协议
5 KB
仓库大小
1 个月前
最后推送
一键安装扩展 / 插件指令
dsh plugin --profile web add github:uckkk/dsh-json-to-rust
git clone https://github.com/uckkk/dsh-json-to-rust.git
git clone git@github.com:uckkk/dsh-json-to-rust.git
README.md main

dsh-json-to-rust · JSON 转 Rust

把 JSON 数据转换为 serde Rust 结构体。纯 Node 实现。

提供的工具

工具 作用
json_to_rust JSON → Rust struct

安装

dsh plugin add dsh-json-to-rust

安装后在 profile 的 package.json 的 dsh.profile.bundles 中加入 "dsh-json-to-rust"。

用法示例

把这个 JSON 转成 Rust 结构体
→ 调用 json_to_rust(data={id:1,name:"test"})

安装

dsh plugin add github:uckkk/dsh-json-to-rust

安装即在本机运行第三方代码,请自行审阅源码。

安装

dsh plugin add github:uckkk/dsh-json-to-rust

使用

安装后在会话中调用该插件注册的工具即可。

许可

MIT

安装即在本机运行第三方代码,请自行审阅源码。