Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/weaming/pretty-format-json


https://github.com/weaming/pretty-format-json

csv json utilities yaml

Last synced: about 5 hours ago
JSON representation

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.