Skip to content

terrcin/jazor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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, 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

About

A simple command line JSON parsing tool

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published