]> git.r.bdr.sh - rbdr/dotfiles/blame - atom/packages/pretty-json/node_modules/jsonminify/TestDoc.html
Update atoms
[rbdr/dotfiles] / atom / packages / pretty-json / node_modules / jsonminify / TestDoc.html
CommitLineData
06a3d686
BB
1 <section class="suite">
2 <h1>JSON.minify</h1>
3 <dl>
4 <dt>define</dt>
5 <dd><pre><code>JSON.minify.should.be.ok;</code></pre></dd>
6 <dt>in-memory string</dt>
7 <dd><pre><code>var json = '{&quot;key&quot;:&quot;value&quot;}';
8var res = JSON.minify(json);
9JSON.parse(res).key.should.equal('value');</code></pre></dd>
10 <dt>comment.json</dt>
11 <dd><pre><code>var json = fs.readFileSync(__dirname + '/comment.json', 'utf8');
12var res = JSON.parse(JSON.minify(json));
13res.foo.should.equal('bar');</code></pre></dd>
14 <dt>comment.json</dt>
15 <dd><pre><code>var json = fs.readFileSync(__dirname + '/plain.json', 'utf8');
16var res = JSON.parse(JSON.minify(json));
17res.foo.should.equal('bar');</code></pre></dd>
18 </dl>
19 </section>