read-json-sync
A Node module to read and parse a JSON file synchronously
var readJsonSync = require('read-json-sync');
readJsonSync('package.json');
Node's built-in require
can do almost the same thing, but this module doesn't cache results.
Check read-json module if you want to read a JSON file asynchronously.
Installation
Install with npm.
npm install read-json-sync
API
var readJsonSync = require('read-json-sync');
readJsonSync(filePath [, options])
filePath: String
(path to a JSON file)
options: Object
(fs.readFile
options)
Return: Object
(parsed JSON data)
License
Copyright (c) 2014 Shinnosuke Watanabe
Licensed under the MIT License.