https://github.com/weaming/pretty-format-json
https://github.com/weaming/pretty-format-json
csv json utilities yaml
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/weaming/pretty-format-json
- Owner: weaming
- Created: 2018-06-25T09:57:37.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2020-07-20T07:35:32.000Z (over 5 years ago)
- Last Synced: 2025-02-12T22:38:30.405Z (about 1 year ago)
- Topics: csv, json, utilities, yaml
- Language: Python
- Size: 25.4 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Pretty Format JSON
Pretty print json contains python style coments, string literal.
```
pip3 install pretty-format-json
```
Yaml and CSV write works fine in Python3 but not in Python2
## Binaries
* `pretty_format_json`: parse NodeJS style, Python style text to JSON
* `csv_json`: Convert between CSV and JSON
* `yaml_json`: Convert between Yaml and JSON
## Use it in VIM
Add `noremap :%!pretty_format_json` (or your key binding) to your config file.
```
noremap :%!pretty_format_json
noremap :%!yaml_json
noremap :%!csv_json
```
When you open a blank buffer, paste the text copied from somewhere into,
then use `Alt+j` to convert to JSON,
use `Alt-k` to convert to Yaml and back to JSON.