Pretty Format JSON
Pretty print JSON containing Python-style comments and string literals.
pip3 install pretty-format-json
Binaries
pretty_format_json: convert text to JSON, supports Python style (comments, single quotes, trailing commas) and NodeJS style (bare keys, JS booleans)csv_json: convert between CSV and JSONyaml_json: convert between YAML and JSON
Usage
echo "{a: 1, 'b': 2,}" | pretty_format_json
Use it in VIM
Add the following lines to your config file:
noremap <a-j> :%!pretty_format_json<CR>
noremap <a-k> :%!yaml_json<CR>
noremap <a-c> :%!csv_json<CR>
When you open a blank buffer, paste the text copied from somewhere,
then use Alt+j to convert to JSON,
use Alt+k to convert to YAML and back to JSON.
Environment variables
JSON_INDENT: indent width (default 2)JSON_SORT_KEYS: sort keys if setDATE_FORMAT: datetime output format (default ISO)
Metadata
Release files for pretty-format-json 0.2.23
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| pretty_format_json-0.2.23.tar.gz | 5.4 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pretty_format_json-0.2.23-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 12.1 kB
Release files / pretty_format_json-0.2.23.tar.gz
| Download URL | pretty_format_json-0.2.23.tar.gz |
|---|---|
| Size | 5.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f7a0a9087136584aa966555d07ca31cd0a450ef9cf8a3ac180052a99e5cfba48
|
|
BLAKE2b-256 checksum How to use checksums |
d1a306326844b2a274929a43eaa084ede188bdee7b1149c29b8ecd54e1f7f955
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.32 {"installer":{"name":"uv","version":"0.11.32","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / pretty_format_json-0.2.23-py3-none-any.whl
| Download URL | pretty_format_json-0.2.23-py3-none-any.whl |
|---|---|
| Size | 6.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
62a5479cc2265d75783043bcd03fecfe9ea6ac98570d6f48146df9940e59100d
|
|
BLAKE2b-256 checksum How to use checksums |
93d3804123f480e6d08291b1d5610e98ee031f04990884b89ec989a3047c07dd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.32 {"installer":{"name":"uv","version":"0.11.32","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for pretty-format-json 0.2.23
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.