]> git.r.bdr.sh - rbdr/dotfiles/blame - atom/packages/pretty-json/node_modules/json-stable-stringify/node_modules/jsonify/README.markdown
Merge remote-tracking branch 'origin/master'
[rbdr/dotfiles] / atom / packages / pretty-json / node_modules / json-stable-stringify / node_modules / jsonify / README.markdown
CommitLineData
06a3d686
BB
1jsonify
2=======
3
4This module provides Douglas Crockford's JSON implementation without modifying
5any globals.
6
7`stringify` and `parse` are merely exported without respect to whether or not a
8global `JSON` object exists.
9
10methods
11=======
12
13var json = require('jsonify');
14
15json.parse(source, reviver)
16---------------------------
17
18Return a new javascript object from a parse of the `source` string.
19
20If a `reviver` function is specified, walk the structure passing each name/value
21pair to `reviver.call(parent, key, value)` to transform the `value` before
22parsing it.
23
24json.stringify(value, replacer, space)
25--------------------------------------
26
27Return a string representation for `value`.
28
29If `replacer` is specified, walk the structure passing each name/value pair to
30`replacer.call(parent, key, value)` to transform the `value` before stringifying
31it.
32
33If `space` is a number, indent the result by that many spaces.
34If `space` is a string, use `space` as the indentation.