Skip to main content

Command-line tool to validate and pretty-print JSON(just for the missing options in `json.tool`)

Project description

Pretty JSON

Tool for printing pretty JSON (just for the missing options in json.tool)

For the issues in Python bug tracker:

Installing

Install and update using pip:

    pip install -U prettyjson

Usage Examples

Example 1

echo '{"name": "vimfun", "from": "The Earth"}' | python -m prettyjson

Result:

{
    "name": "vimfun",
    "from": "The Earth",

}

Example 2

echo '{"name": "vimfun", "from": "The Earth"}' | python -m prettyjson --indent=2

Result:

{
  "name": "vimfun",
  "from": "The Earth"
}

Example 3

echo '{"name": "王旭林", "from": "The Earth"}' | python -m prettyjson --indent=2 --no-ensure-ascii

Result:

{
  "name": "王旭林",
  "from": "The Earth"
}

Links

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

prettyjson-1.0.3.tar.gz (2.8 kB view details)

Uploaded Source

Built Distribution

prettyjson-1.0.3-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

File details

Details for the file prettyjson-1.0.3.tar.gz.

File metadata

  • Download URL: prettyjson-1.0.3.tar.gz
  • Upload date:
  • Size: 2.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.20.1 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.3

File hashes

Hashes for prettyjson-1.0.3.tar.gz
Algorithm Hash digest
SHA256 1d56d98b0e74e1aa40bf8eca8e2412c0c87b7114672681e051657f819d826f74
MD5 8e2ec24c3558b4ab7743e80cc4671551
BLAKE2b-256 e490f220098f71c6337922f2154de7c78442e7d2cbf1c6f432ca6dd52344120a

See more details on using hashes here.

File details

Details for the file prettyjson-1.0.3-py3-none-any.whl.

File metadata

  • Download URL: prettyjson-1.0.3-py3-none-any.whl
  • Upload date:
  • Size: 4.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.20.1 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.3

File hashes

Hashes for prettyjson-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 ac0b5246147ce289e8f1c63c0248f9ab361b662e7073ab9e4ab7018e6d725a9e
MD5 089eb82b9394bb8b1399db3bfa46948a
BLAKE2b-256 e3299601c08f7c12a89815edf4daa1e21317443d6ea8bc940aa98476b77bd910

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page