summaryrefslogtreecommitdiffstats
path: root/3rdparty/js/angular-1.0.2/docs/partials/api/angular.toJson.html
blob: a03a9db2ed6b1f72ef30da70e6a785cf49d2051d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<h1><code ng:non-bindable="">angular.toJson</code>
<span class="hint">(API in module <code ng:non-bindable="">ng</code>
)</span>
</h1>
<div><h2 id="Description">Description</h2>
<div class="description"><p>Serializes input into a JSON-formatted string.</p></div>
<h2 id="Usage">Usage</h2>
<div class="usage"><pre class="prettyprint linenums">angular.toJson(obj[, pretty]);</pre>
<h3 id="Parameters">Parameters</h3>
<ul class="parameters"><li><code ng:non-bindable="">obj – {Object|Array|Date|string|number} – </code>
<p>Input to be serialized into JSON.</p></li>
<li><code ng:non-bindable="">pretty<i>(optional)</i> – {boolean=} – </code>
<p>If set to true, the JSON output will contain newlines and whitespace.</p></li>
</ul>
<h3 id="Returns">Returns</h3>
<div class="returns"><code ng:non-bindable="">{string}</code><p>Jsonified string representing <code>obj</code>.</p></div>
</div>
</div>