jpp - JSON Pretty Printer

Pretty print JSON with optional path extraction. Lightweight jq alternative.

Quick Start

cat data.json | jpp
jpp file.json
jpp file.json .key
curl -s api.example.com | jpp .data[0]

Usage

jpp [file] [path]           # Pretty print, optionally extract path
cat file | jpp [path]       # Read from stdin

Path Syntax

Pattern Description

.key

Get key from object

.key.subkey

Nested key access

.[0]

Array index

.data[0].name

Combined access

Examples

Pretty Print File

jpp config.json

Pretty Print from Pipe

curl -s https://api.github.com/users/octocat | jpp

Extract Nested Value

jpp response.json .data.results[0].name

Extract from API Response

curl -s https://api.example.com/users | jpp .[0].email

When to Use

  • Quick JSON inspection without installing jq

  • Simple path extraction

  • Pipe from curl/wget for API debugging

Limitations

  • No filtering (use jq for complex queries)

  • No transformation

  • Read-only

Dependencies

None - uses Python standard library json.