Home > jazor

jazor

Jazor is a project mainly written in ..., based on the GPL-3.0 license.

A simple command line JSON parsing tool

= 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['']), or if the JSON object is an array, like an array (e.g. json[0], 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