Unbelievable and Modern JSON interface.
npm install json-future
!Last version


> Modern JSON interface. propositions for ECMAScript 7.
* High level methods for manipulate JSON files.
* Backward compatibility with JSON Object in Node/Browser.
* Async support (callback/promise) based on ECMAScript proposal.
JSON Future is based into a set of cool libraries to handle JSON, but some of this libraries uses promises or callback style. This library adds an extra layer to call these libraries uniformly.
``bash`
npm install json-future --save
`js`
const jsonFuture = require('json-future')
Don't be afraid to replace for the default JSON object. The library is specially designed for be compatible and don't break your code:
`js`
JSON = require('json-future')
Also you can do this action using the register helper:
`js`
require('json-future/register')
In async methods, if you don't provide a callback for node style, then the method return a Promise.
Creates the string version of the input.
Creates the object version of the input.
Returns the parsed JSON.
Stringify and write JSON to a file atomically.
#### options
##### indent
Type: string, number\t
Default:
Indentation as a string or number of spaces.
Pass in null for no formatting.
##### sortKeys
Type: boolean, functionfalse
Default:
Sort the keys recursively.
Optionally pass in a compare function.
##### replacer
Type: function
Passed into JSON.stringify.
##### mode
Type: number438` (0666 in octal)
Default
Mode used when writing the file.
MIT © Kiko Beats