Skip to content
Filter JSON documents with line-oriented utilities
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
expected
LICENSE
Makefile
NEWS
README.md
flattenjs.1
flattenjs.rb
test.sh

README.md

FlattenJS

The flattenjs utility enables JSON documents to be filtered and parsed with line-oriented utilities by printing a flattened representation that is compatible with the PostgreSQL query operators #> and #>>.

flattenjs was initially designed as a companion to pg_tmp.

Installation - BSD, Mac OS, and Linux

make install

Or to specify a specific installation location

PREFIX=$HOME/local make install

Man Page Examples

Print a flattened representation of a JSON structure:

$ flattenjs < my.json

Print the lines for any path that contains the word "author":

$ flattenjs < my.json | awk '/author.+ /'

News

A release history as well as features in the upcoming release are covered in the NEWS file.

You can’t perform that action at this time.