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 --save 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.
💖 Support my projects
I open-source almost everything I can, and I try to reply everyone needing help using these projects. Obviously, this takes time. You can integrate and use these projects in your applications for free! You can even change the source code and redistribute (even resell it).
However, if you get some profit from this or just want to encourage me to continue creating stuff, there are few ways you can do it:
Starring and sharing the projects you like 🚀
—You can make one-time donations via PayPal. I'll probably buy a
coffeetea. 🍵—Set up a recurring monthly donation and you will get interesting news about what I'm doing (things that I don't share with everyone).
Bitcoin—You can send me bitcoins at this address (or scanning the code below):
1P9BRsmazNQcuyTxEqveUsnf5CERdq35V6
Thanks! ❤️
💫 Where is this library used?
If you are using this library in one of your projects, add it in this list. ✨
bible
—Read the Holy Bible via the command line.birthday
—Know when a friend's birthday is coming.blah
—A command line tool to optimize the repetitive actions.bloggify-plugin-class
—A library for managing plugin objects.cdnjs-importer
—Easy way to import a library into CDNJS.cli-sunset
—A fancy command line tool for knowing the sunset time.edit-json-file
—Edit a json file with ease.emojic
—Emoji in your Node.js command line apps.engine-app
(by jillix)—Engine app related helper functions.engine-composition-crud
(by jillix)—The default module for creating, reading, updating and deleting Engine instances.engine-parser
(by jillix)—Engine composition parser.engine-tools
(by jillix)—Engine Tools library and CLI app.gh-notifier
—Receive desktop notifications from your GitHub dashboard.ghcal
—See the GitHub contributions calendar of a user in the command line.git-package-json
—Get the package.json contents from git repositories.git-stats
—Local git statistics including GitHub-like contributions calendars.github-labeller
—Automagically create issue labels in your GitHub projects.gpm
—npm + git = gpm - Install NPM packages and dependencies from git repositories.idea
—A lightweight CLI tool and module for keeping ideas in a safe place quick and easy.made-in-brazil
—A list of neat projects made in Brazil.made-in-india
—A list of neat projects made in India.made-in-romania
—A list of cool projects made in Romania.namy
—Gets the name of the exported function.np-init
—Easily start a npm package from scratch.packy
—Set default fields in your package.json files.r-package-json
—Read package.json files.safe-r-json
—A convenient JSON file reader.ship-release
—Publish new versions on GitHub and npm with ease.test-youtube-api
—Test Youtube API NodeJS moduletilda
—Tiny module for building command line tools.tithe
—Organize and track the tithe payments.web-term
—A full screen terminal in your browser.youtube-album-uploader
(by Jared Chapiewsky)—Uploads an mp3 album to Youtube