Skip to content

Latest commit

 

History

History
 
 

formatter-json

@putout/formatter-json NPM version

JSON is a syntax for serializing objects, arrays, numbers, strings, booleans, and null. It is based upon JavaScript syntax but is distinct from it: some JavaScript is not JSON.

(c) MDN

🐊Putout formatter outputs JSON, when done.

Install

npm i putout @putout/formatter-json

Usage

putout --format json lib

Result example:

{
    "errors": [{
        "name": "/home/coderaiser/putout/packages/putout/lib/putout.js",
        "places": [{
            "rule": "remove-debugger",
            "message": "Unexpected \"debugger\" statement",
            "position": {
                "line": 3,
                "column": 0
            }
        }]
    }],
    "filesCount": 1,
    "errorsCount": 1
}

License

MIT