@pfx/json
v0.10.4
Published
JSON plugin for pf, the fast and extensible command-line data (e.g. JSON) processor and transformer
Downloads
25
Maintainers
Readme
@pfx/json
is a JSON plugin for pf
, the fast and extensible command-line data (e.g. JSON) processor and transformer.
See the pf
github repository for more details!
Installation
:ok_hand:
@pfx/json
comes preinstalled inpf
. No installation necessary. If you still want to install it, proceed as described below.
@pfx/json
is installed in ~/.pfrc/
as follows:
npm install @pfx/json
The plugin is included in ~/.pfrc/index.js
as follows:
const json = require('@pfx/json')
module.exports = {
plugins: [json],
context: {},
defaults: {}
}
For a much more detailed description, see the .pfrc
module documentation.
Extensions
This plugin comes with the following pf
extensions:
| | Description |
|-------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| jsonObj
lexer | Searches the data for JSON objects and returns each object as a token. All data between objects is dropped. This is useful in a streaming context, or when parsing files containing one big JSON list of JSON objects. |
| json
parser | Parses data into JSON. Uses JSON.parse internally. |
| json
marshaller | Serializes transformed JSON into JSON using JSON.stringify. |
Reporting Issues
Please report issues in the tracker!
License
@pfx/json
is MIT licensed.