MCPcopy Create free account
hub / github.com/bclinkinbeard/angular / toJson

Function toJson

test/fixtures/foo.js:1119–1122  ·  view source on GitHub ↗

* @ngdoc function * @name angular.toJson * @module ng * @kind function * * @description * Serializes input into a JSON-formatted string. Properties with leading $ characters will be * stripped since angular uses this notation internally. * * @param {Object|Array|Date|string|number} obj Inpu

(obj, pretty)

Source from the content-addressed store, hash-verified

1117 * @returns {string|undefined} JSON-ified string representing `obj`.
1118 */
1119function toJson(obj, pretty) {
1120 if (typeof obj === 'undefined') return undefined;
1121 return JSON.stringify(obj, toJsonReplacer, pretty ? ' ' : null);
1122}
1123
1124
1125/**

Callers 6

minErrFunction · 0.85
$HttpProviderFunction · 0.85
buildUrlFunction · 0.85
$interpolateFunction · 0.85
$RootScopeProviderFunction · 0.85
jsonFilterFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected