Skip to content

M-J-Hooper/rq

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 

Repository files navigation

rq

A rust implementation of the popular command-line JSON processor, jq.

Installation

cargo install --git https://github.com/M-J-Hooper/rq

Example

curl 'https://api.github.com/repos/M-J-Hooper/rq/commits' | rq '.[].sha'

Implementation

  1. Parse JSON input using serde_json.
  2. Parse jq query syntax into a Query using a recursive parser built with nom.
  3. Execute query against the JSON value which recursively propagates through the nested queries to produce JSON values as a result.

This was mostly done as a learning exercise and as such it does not support some of the more obscure (and less useful) features of the original. However, it is likely feature-complete enough for day-to-day use.

About

A rust implementation of jq

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages