MCPcopy
hub / github.com/angular-ui/ui-router / fromJson

Function fromJson

test/angular/1.3/angular.js:1073–1077  ·  view source on GitHub ↗

* @ngdoc function * @name angular.fromJson * @module ng * @kind function * * @description * Deserializes a JSON string. * * @param {string} json JSON string to deserialize. * @returns {Object|Array|string|number} Deserialized JSON string.

(json)

Source from the content-addressed store, hash-verified

1071 * @returns {Object|Array|string|number} Deserialized JSON string.
1072 */
1073function fromJson(json) {
1074 return isString(json)
1075 ? JSON.parse(json)
1076 : json;
1077}
1078
1079
1080/**

Callers 1

Calls 1

isStringFunction · 0.70

Tested by

no test coverage detected