A simple command line JSON parsing tool
Switch branches/tags
Nothing to show
Clone or download
Pull request Compare This branch is 32 commits behind mconigliaro:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
bin
lib
test
.gitignore
COPYING.txt
README.rdoc
Rakefile
jazor.gemspec

README.rdoc

Jazor

Jazor is a simple command line JSON parsing tool.

Installation

gem install jazor

General usage

jazor [options] [source] [slice]
  • The source option refers to a file, URL or string containing JSON data. Jazor also accepts input from STDIN.

  • The slice option refers to the piece of JSON data you're interested in. This is usually just the name of an attribute, but you can also access it like a hash (e.g. json, etc.).

Examples

Reading the entire JSON object from a URL

jazor 'http://ajax.googleapis.com/ajax/services/search/web?v=1.0&q=jazor'

Reading a JSON “slice” from a URL

jazor 'http://ajax.googleapis.com/ajax/services/search/web?v=1.0&q=jazor' responseData.results[0].title

Testing the value of a JSON “slice”

jazor 'http://ajax.googleapis.com/ajax/services/search/web?v=1.0&q=jazor' -t 'responseData.results.is_a?(Array)'

Help

jazor --help