Skip to content

Instantly share code, notes, and snippets.

@mojodna
Forked from nicksieger/jsonpretty.txt
Created February 20, 2009 19:54
Show Gist options
  • Save mojodna/67663 to your computer and use it in GitHub Desktop.
Save mojodna/67663 to your computer and use it in GitHub Desktop.
nicksieger's jsonpretty example with syntax highlighting
jsonpretty: A command-line JSON pretty-printer.
Get it: gem install jsonpretty
Source: http://github.com/nicksieger/jsonpretty
Example:
$ curl -i http://github.com/api/v1/json/nicksieger | jsonpretty | pygmentize -l js
HTTP/1.1 200 OK
Server: nginx/0.6.26
Date: Fri, 20 Feb 2009 19:18:44 GMT
Content-Type: application/json; charset=utf-8
Connection: keep-alive
Set-Cookie: _github_ses=BAh7BiIKZmxhc2hJQzonQWN0aW9uQ29udHJvbGxlcjo6Rmxhc2g6OkZsYXNoSGFzaHsABjoKQHVzZWR7AA%3D%3D--884981fc5aa85daf318eeff084d98e2cff92578f; path=/; expires=Wed, 01 Jan 2020 08:00:00 GMT; HttpOnly
Status: 200 OK
X-Runtime: 176ms
ETag: "ff9f83dca3a50446908120cf71a1eec3"
Cache-Control: private, max-age=0, must-revalidate
Content-Length: 5916
{
"user": {
"name": "Nick Sieger",
"repositories": [
{
"name": "sinatra",
"watchers": 2,
"private": false,
"url": "http:\/\/github.com\/nicksieger\/sinatra",
"fork": true,
"description": "Classy web-development dressed in a DSL",
"forks": 0,
"homepage": "http:\/\/sinatrarb.com",
"owner": "nicksieger"
},
{
"name": "stickshift",
"watchers": 1,
"private": false,
"url": "http:\/\/github.com\/nicksieger\/stickshift",
"fork": false,
"description": "Pedal to the metal manual profiler",
"forks": 0,
"homepage": "",
"owner": "nicksieger"
},
{
"name": "warbler",
"watchers": 58,
"private": false,
"url": "http:\/\/github.com\/nicksieger\/warbler",
"fork": false,
"description": "Warbler chirpily constructs .war files of your Rails applications.",
"forks": 11,
"homepage": "http:\/\/caldersphere.rubyforge.org\/warbler",
"owner": "nicksieger"
},
{
"name": "ci_reporter",
"watchers": 8,
"private": false,
"url": "http:\/\/github.com\/nicksieger\/ci_reporter",
"fork": false,
"description": "CI::Reporter is an add-on to Test::Unit and RSpec that allows you to generate XML reports of your test and\/or spec runs.",
"forks": 3,
"homepage": "http:\/\/caldersphere.rubyforge.org\/ci_reporter",
"owner": "nicksieger"
},
{
"name": "jrexml",
"watchers": 2,
"private": false,
"url": "http:\/\/github.com\/nicksieger\/jrexml",
"fork": false,
"description": "JREXML is an add-on for JRuby that uses a Java pull parser library to speed up REXML.",
"forks": 0,
"homepage": "http:\/\/caldersphere.rubyforge.org\/jrexml",
"owner": "nicksieger"
},
{
"name": "attachment_fu",
"watchers": 1,
"private": false,
"url": "http:\/\/github.com\/nicksieger\/attachment_fu",
"fork": true,
"description": "Treat an ActiveRecord model as a file attachment, storing its patch, size, content type, etc.",
"forks": 0,
"homepage": "http:\/\/weblog.techno-weenie.net",
"owner": "nicksieger"
},
{
"name": "activerecord-jdbc-adapter",
"watchers": 39,
"private": false,
"url": "http:\/\/github.com\/nicksieger\/activerecord-jdbc-adapter",
"fork": false,
"description": "ActiveRecord adapter for JDBC and JRuby",
"forks": 13,
"homepage": "http:\/\/jruby-extras.rubyforge.org\/activerecord-jdbc-adapter",
"owner": "nicksieger"
},
{
"name": "rails",
"watchers": 5,
"private": false,
"url": "http:\/\/github.com\/nicksieger\/rails",
"fork": true,
"description": "Ruby on Rails",
"forks": 1,
"homepage": "http:\/\/rubyonrails.org",
"owner": "nicksieger"
},
{
"name": "webrat",
"watchers": 1,
"private": false,
"url": "http:\/\/github.com\/nicksieger\/webrat",
"fork": true,
"description": "Webrat - Ruby Acceptance Testing for Web applications",
"forks": 0,
"homepage": "http:\/\/www.brynary.com\/uploads\/webrat\/rdoc\/index.html",
"owner": "nicksieger"
},
{
"name": "ruby-processing",
"watchers": 2,
"private": false,
"url": "http:\/\/github.com\/nicksieger\/ruby-processing",
"fork": true,
"description": "Code as Art, Art as Code. Processing and Ruby are meant for each other.",
"forks": 0,
"homepage": "http:\/\/github.com\/jashkenas\/ruby-processing\/wikis",
"owner": "nicksieger"
},
{
"name": "jruby-rack",
"watchers": 47,
"private": false,
"url": "http:\/\/github.com\/nicksieger\/jruby-rack",
"fork": false,
"description": "Rack for JRuby and Java appservers",
"forks": 11,
"homepage": "<span><a href=\"http:\/\/jruby-rack.kenai.com\/pages\/Home\">http:\/\/jruby-rack.kenai.com\/pages\/Home<\/a><\/span>",
"owner": "nicksieger"
},
{
"name": "gitjour",
"watchers": 2,
"private": false,
"url": "http:\/\/github.com\/nicksieger\/gitjour",
"fork": true,
"description": "Serve git and advertise with bonjour",
"forks": 0,
"homepage": "http:\/\/rubyforge.org\/projects\/gitjour",
"owner": "nicksieger"
},
{
"name": "jruby",
"watchers": 28,
"private": false,
"url": "http:\/\/github.com\/nicksieger\/jruby",
"fork": false,
"description": "Git mirror of http:\/\/svn.codehaus.org\/jruby\/trunk\/jruby",
"forks": 2,
"homepage": "http:\/\/wiki.jruby.org\/",
"owner": "nicksieger"
},
{
"name": "multipart-post",
"watchers": 9,
"private": false,
"url": "http:\/\/github.com\/nicksieger\/multipart-post",
"fork": false,
"description": "Adds multipart POST capability to net\/http",
"forks": 1,
"homepage": "",
"owner": "nicksieger"
},
{
"name": "jetty-rails",
"watchers": 2,
"private": false,
"url": "http:\/\/github.com\/nicksieger\/jetty-rails",
"fork": true,
"description": "use jetty to run any warbler based rails project",
"forks": 0,
"homepage": "http:\/\/jetty-rails.rubyforge.net",
"owner": "nicksieger"
},
{
"name": "github-gem",
"watchers": 1,
"private": false,
"url": "http:\/\/github.com\/nicksieger\/github-gem",
"fork": true,
"description": "The official `github` command line helper for simplifying your GitHub experience.",
"forks": 0,
"homepage": "http:\/\/github.com",
"owner": "nicksieger"
},
{
"name": "drbirb",
"watchers": 1,
"private": false,
"url": "http:\/\/github.com\/nicksieger\/drbirb",
"fork": false,
"description": "Simple IRB-over DRb for poking inside your servers",
"forks": 0,
"homepage": "",
"owner": "nicksieger"
},
{
"name": "textmate.el",
"watchers": 1,
"private": false,
"url": "http:\/\/github.com\/nicksieger\/textmate.el",
"fork": true,
"description": "Basic emulation of awesome TextMate features for Emacs.",
"forks": 0,
"homepage": "",
"owner": "nicksieger"
},
{
"name": "advent-jruby",
"watchers": 4,
"private": false,
"url": "http:\/\/github.com\/nicksieger\/advent-jruby",
"fork": false,
"description": "Code for article on Ruby Advent 2008",
"forks": 0,
"homepage": "",
"owner": "nicksieger"
},
{
"name": "rinari",
"watchers": 1,
"private": false,
"url": "http:\/\/github.com\/nicksieger\/rinari",
"fork": true,
"description": "Rinari Is Not A Rails IDE",
"forks": 0,
"homepage": "http:\/\/rinari.rubyforge.org",
"owner": "nicksieger"
},
{
"name": "jsonpretty",
"watchers": 1,
"private": false,
"url": "http:\/\/github.com\/nicksieger\/jsonpretty",
"fork": false,
"description": "Command-line JSON pretty-printer",
"forks": 0,
"homepage": "",
"owner": "nicksieger"
}
],
"blog": "http:\/\/blog.nicksieger.com\/",
"login": "nicksieger",
"email": "nick@nicksieger.com"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment