Socket
Socket
Sign inDemoInstall

prettyjson

Package Overview
Dependencies
0
Maintainers
1
Alerts
File Explorer

Install Socket

Detect and block malicious and high-risk dependencies

Install

    prettyjson

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


Maintainers
1

Readme

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"
}

FAQs


Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc