beesn

0.0.5 • Public • Published

🚚🐝 Beesn

pipeline status

CLI utility for converting between JSON and BSON formats

Usage

Arguments:

-x                       enables JSON -> BSON (default is BSON -> JSON)
-i FILE, --input FILE    name of input file, "-" for STDIN (default: "-")
-o FILE, --output FILE   name of output file, "-" for STDOUT (default: "-")
--stream                 reading a file containing multiple items, wrapping array is added
-w, --overwrite          allow overwriting output file
-d, --debug              debug output
-v, --verbose            print more info
-h, --help               print help text

Examples

Read BSON, convert to JSON and print result:

$ beesn -i test-data/01.bson
{
  "a""string",
  "b": [
    true,
    0
  ]
}

Read JSON, convert to BSON and save to file:

$ beesn -x -i test-data/01.json -o my.bson
$ beesn -i my.bson # print fresh BSON file 
{
  "a""string",
  "b": [
    true,
    0
  ]
}

Dependencies

Installation

npm alone had some issues when installing package globally. I recommend using yarn.

$ sudo npm i -g yarn
$ sudo yarn global add beesn

Stream mode

Can be used to read MongoDB dumps. Be warned - there is only limited error detection and error reporting.

$ beesn --stream -i test-data/02-mongo.bson

License

MIT

Dependencies (5)

Dev Dependencies (11)

Package Sidebar

Install

npm i beesn

Weekly Downloads

1

Version

0.0.5

License

MIT

Unpacked Size

24.8 kB

Total Files

16

Last publish

Collaborators

  • monnef