@pfx/json

0.10.4 • Public • Published

@pfx/json teaser

@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!

node version npm version license PRs Welcome linux unit tests status macos unit tests status windows unit tests status

Installation

👌 @pfx/json comes preinstalled in pf. 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.

Dependencies (0)

    Dev Dependencies (2)

    Package Sidebar

    Install

    npm i @pfx/json

    Weekly Downloads

    1

    Version

    0.10.4

    License

    MIT

    Unpacked Size

    126 kB

    Total Files

    26

    Last publish

    Collaborators

    • yordle