1.0.21 • Published 7 years ago

json-serialize-deserialize v1.0.21

Weekly downloads
-
License
ISC
Repository
-
Last release
7 years ago

JSON Serializer Deserialize

JSON serializer deserialize makes the Read/Write operations on the JSON files easily. The applications employing the config files in JSON could utilize this plugin by simply importing the module and avoiding interating with the fs module. Focus only on reading, updating and saving the JSON.

Now support for typescript. prior updates to 1.0.2

Installation

  1. Run the following command to installnpm install json-serialize-deserialize.

Usage and snippets

var jsonSerializer = require('json-serialize-deserialize');
jsonSerializer.readFile ('path.to.config.json')
	.then ((fileData) => {
		// do something with the filedata

		fileData.revenue = 9809;

		jsonSerializer.writeFile ('path.to.config.json')
			.then ((val) => {
				console.log ('write success')
			}).catch ((err) => {
				console.error (err);
			})
	}).catch ((err) => {
		console.error (err);
	});
1.0.21

7 years ago

1.0.2

7 years ago

1.0.12

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago