Skip to content

A query tool for son like objects, for example, json and bson.

Notifications You must be signed in to change notification settings

socrateslee/sonq

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sonq

sonq means son query, is a tool for querying son like objects, for example, JSON and BSON. You may use sonq to query .bson or newline separated .json files(JSON Lines) directly from the command line.

Install

pip install sonq

Basic Usage

  • List the content of a .bson file
sonq source.bson
  • Query a .bson file
sonq -f '{"name": "Stark"}' source.bson
  • Convert query results to a newline separated .json file
sonq -f '{"name": "Stark"}' -o target.json source.bson
  • Convert json from stdin to .bson
echo '{"name": "Stark"}' | python3 -m sonq.cmd -o target.bson - 

About

A query tool for son like objects, for example, json and bson.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages