1个不稳定版本
0.1.0 | 2021年9月10日 |
---|
#35 in #bincode
10KB
188 行
多语言 | vsp
命令行工具,用于转换文件格式
# transpiles Cargo.toml to json and writes it under cargo.json
# the file formats are inferred, but they can be overriden.
vsp Cargo.toml cargo.json
# the f stands for `from` and t stands for `to`
vsp Cargo.toml cargo.yaml -f json -t yaml
# vsp can also be piped if no input and output is provided
# file formats need to be specified since they cannot be inferred.
cat Cargo.toml | vsp -f toml -t yaml | cargo.yaml
当前输入选项及其推断扩展如下:
- Json
- .json
- Yaml
- .yaml或.yml
- Cbor
- .cb或.cbor
- Ron
- .ron
- Toml
- .toml
- Bson
- .bson或.bs
当前输出选项如下:
- Pickle
- .pickle或.pkl
- Bincode
- .bc或.bincode
- Postcard
- .pc或.postcard
- Flexbuffers
- .fb或.flexbuffers
- Json
- .json
- PrettyJson
- .hjson
- Yaml
- .yaml或.yml
- Cbor
- .cbor或.cb
- Ron
- .ron
- PrettyRon
- .hron
- Toml
- .toml
- Bson
- .bs或.bson
依赖项
~11MB
~206K SLoC