read-json-file

1.0.1 • Public • Published

read-json-file

Read and parse a JSON file asynchronously using a callback.

Usage

var readJson = require('read-json-file');
 
readJSON(pathToYourJson, function(error, data){
    if (error) {
        throw error;
    }
    console.log(data);
});

Errors

Returns any fs or Json.Parse() errors.

Byte order markers

Byte order markers are striped before parsing.

Readme

Keywords

none

Package Sidebar

Install

npm i read-json-file

Weekly Downloads

119

Version

1.0.1

License

MIT

Last publish

Collaborators

  • mattlarner