npm.io
1.0.2 • Published 5 years agoCLI

stdin2json

Licence
MIT
Version
1.0.2
Deps
7
Size
4 kB
Vulns
6
Weekly
0

stdin2json

Command-line tool for converting anything to JSON.

Features

  • Eat everything, spits out json
  • Supports json, yaml, toml, xml, ini, cli tables
  • Formatting and highlighting
  • Standalone binary

Install

$ npm install -g stdin2json

Usage

$ stdin2json resp.xml > resp.json

$ cat config.yaml | stdin2json > config.json

$ stdin2json deps.toml

$ ps | eat | fx .PID
Other examples

Use it with fx tool for extracting needed fields.

$ cat response.xml | eat | fx .Document.Title
  • fx – cli JSON processor on JS
  • any-json - alternative cli tool for converting formats

License

MIT

Keywords