• Stars
    star
    109
  • Rank 319,077 (Top 7 %)
  • Language
    Go
  • License
    MIT License
  • Created almost 16 years ago
  • Updated almost 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Command-line JSON pretty-printer

jsonpretty

DESCRIPTION

Command-line JSON pretty-printer. Pipe any JSON output to pretty-print it with 2-space indent.

FEATURES

  • Parse and pretty-print JSON/JSONP either from stdin or from command-line arguments.
  • All arguments are concatenated together in a single string for pretty-printing.
  • Use @filename as an argument to include the contents of the file.
  • Use - or @- as an argument (or use no arguments) to read stdin.
  • Detects HTTP response/headers, prints them untouched, and skips to the body (for use with `curl -i').

SYNOPSIS

curl -i http://api.com/json | jsonpretty

REQUIREMENTS

  • For the Ruby version: any Ruby version >= 2 installed
  • For the Go version: none for the release binary, or Go 1.17 for go install

INSTALL

Install the Ruby version with rubygems:

gem install jsonpretty

Install the Ruby version globally with Homebrew and brew-gem:

brew install brew-gem
brew gem install jsonpretty

Install the Go version with go install (requires Go 1.17):

go install github.com/nicksieger/jsonpretty

Or install the Go version from a release with curl+tar:

VERSION=1.2.0
OS=$(uname -s)
ARCH=$(uname -m)
curl -L https://github.com/nicksieger/jsonpretty/releases/download/v${VERSION}/jsonpretty_${VERSION}_${OS}_${ARCH}.tar.gz | sudo tar -C /usr/local/bin -zxf - jsonpretty

LICENSE

See LICENSE.

More Repositories

1

sheepsafe

Keep safe from FireSheep
Ruby
211
star
2

refactoring-to-rails

Example of refactoring a Spring/Hibernate application to Rails
Java
51
star
3

neo4j-rails

Neo4j + ActiveModel for Rails 3
Ruby
29
star
4

drbirb

Simple IRB-over DRb for poking inside your servers
Ruby
12
star
5

stickshift

Pedal to the metal manual profiler
Ruby
12
star
6

warbler-demos

Demos of using Warbler to create executable .jar applications
Ruby
10
star
7

rake-ant

Example of using Rake, Ant, RSpec and Cucumber in a Java project
Ruby
9
star
8

advent-jruby

Code for article on Ruby Advent 2008
Ruby
9
star
9

spring-petclinic

Sandbox for exploring JRuby integration with a legacy Spring app
Java
8
star
10

jrexml

JREXML is an add-on for JRuby that uses a Java pull parser library to speed up REXML.
Ruby
7
star
11

jruby-sinatra-env

Simple environment-sniffer Sinatra app for JRuby-Rack
JavaScript
6
star
12

java-from-ruby-examples

Examples from JRubyConf tutorial day
Ruby
5
star
13

activerecord-cachedb-adapter

ActiveRecord adapter for Intersystems CacheDb
Ruby
5
star
14

ruby-jersey

JSR-311/Jersey with Ruby resource classes
Ruby
4
star
15

simple-rack-benchmark

Ruby
4
star
16

rack-chain

Rack::Chain uses fibers to minimize stack depth in Rack applications.
Ruby
3
star
17

railsbridgemn

Resources for RailsBridge MN
3
star
18

trinidad

Simple library to run rails and rackup applications into an embedded Apache Tomcat
Ruby
1
star
19

tilt-custom-extensions

Tilt extensions to customize your Tilt setup and do useful things
Shell
1
star
20

guard-jmx

JMX interaction with Guard
Ruby
1
star
21

ey-cloud-recipes

A starter repo for custom chef recipes on EY's cloud platform
Ruby
1
star
22

xmlbench

Some benchmarks for Ruby XML libraries
Ruby
1
star
23

ytrbium

Simple YAML+ERB templating in Ruby
Ruby
1
star
24

razorpit

A pure Ruby JavaScript implementation
Ruby
1
star