Package Exports
- r-json
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (r-json) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
r-json 
A small module to read JSON files.
If you want to write JSON files, check out w-json
.
Installation
$ npm i r-json
Example
// Dependencies
var ReadJson = require("r-json");
// Read the json file asynchronously
ReadJson(__dirname + "/test.json", function (err, data) {
console.log(err || data);
});
// Read the same file synchronously
console.log(ReadJson(__dirname + "/test.json"));
Documentation
rJson(path, callback)
Params
- String
path
: The JSON file path. - Function
callback
: An optional callback. If not passed, the function will run in sync mode.
How to contribute
Have an idea? Found a bug? See how to contribute.
License
KINDLY © Ionică Bizău–The LICENSE file contains a copy of the license.