Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lucascompython/dsc
A blazingly fast Data Serialization Language Convertor
https://github.com/lucascompython/dsc
blazingly-fast cli json rust serde toml tool xml yaml
Last synced: about 1 month ago
JSON representation
A blazingly fast Data Serialization Language Convertor
- Host: GitHub
- URL: https://github.com/lucascompython/dsc
- Owner: lucascompython
- License: gpl-3.0
- Created: 2023-03-19T02:14:25.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2024-03-23T00:12:41.000Z (9 months ago)
- Last Synced: 2024-03-23T01:25:56.755Z (9 months ago)
- Topics: blazingly-fast, cli, json, rust, serde, toml, tool, xml, yaml
- Language: Rust
- Homepage:
- Size: 55.7 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# dsc (Data Serialization Language Converter)
This is a `blazingly fast` tool that converts data from one format to another .
It uses [serde](https://crates.io/crates/serde), [serde_json](https://crates.io/crates/serde_json), [serde_yaml](https://crates.io/crates/serde_yaml), [toml](https://crates.io/crates/toml) and [quick-xml](https://crates.io/crates/quick-xml) to do the heavy lifting.
Null values are not supported in toml, at least for now.## Examples
```ps1
dsc --help # to see all the options
```Reading from stdin and writing to a file:
```ps1
cat input.json | dsc --from json out.yaml # target format is inferred from the file extension
```Writing to stdout and reading from a file:
```ps1
dsc input.toml --to xml > out.xml # source format is inferred from the file extension
```Reading from stdin and writing to stdout:
```ps1
# here both formats need to be explicitly specified because there are no file extensions
curl -s https://api.github.com/users/lucascompython | dsc --from json --to yaml | cat
```Reading from a file and writing to another file:
```ps1
# the -o flags enables whitespace removal and the -r flag sets the root tag for xml
dsc input.toml out.xml -r roottag -o # formats are inferred from the file extensions
```