Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/timclicks/thisthat
Data conversion utility
https://github.com/timclicks/thisthat
Last synced: 3 days ago
JSON representation
Data conversion utility
- Host: GitHub
- URL: https://github.com/timclicks/thisthat
- Owner: timClicks
- License: other
- Created: 2022-11-19T20:52:33.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2022-12-18T08:11:45.000Z (about 2 years ago)
- Last Synced: 2025-01-19T11:15:22.335Z (7 days ago)
- Language: Rust
- Size: 13.7 KB
- Stars: 37
- Watchers: 2
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# thisthat
Data format conversion utility.
## About
**thisthat** provides a command-line tool `tt` for converting between data formats.
It can to and from convert between these formats:- CBOR
- JSON
- MsgPack
- YAML
- Pickle
- RON
- TOML
- x-www-form-urlencoded ("url" or "www-form")## Usage
`tt` reads from stdin and writes to stdout. Specify the formats using positional
parameters, e.g. `tt THIS THAT`. For example, to convert from JSON to TOML, use
`tt json toml`.```console
$ echo '{"abc": 123 }' | tt json toml
abc = 123
```To convert data from a file, use `cat` (or an equivalent tool) to do the reading.
```console
$ echo '{"abc": 123 }' > /tmp/example.json
$ cat /tmp/example.json | tt json toml
abc = 123
```Some formats produce non-printable characters. Send the output to anther tool to
generate readable output.```console
$ echo '{"abc": 123 }' | tt json msgpack | base64
gaNhYmN7
```