MCPcopy Create free account
hub / github.com/EricSimons/ionic-course / fromJson

Function fromJson

code/songhop/www/lib/angular/angular.js:1056–1060  ·  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 thingy.

(json)

Source from the content-addressed store, hash-verified

1054 * @returns {Object|Array|string|number} Deserialized thingy.
1055 */
1056function fromJson(json) {
1057 return isString(json)
1058 ? JSON.parse(json)
1059 : json;
1060}
1061
1062
1063/**

Callers 1

Calls 1

isStringFunction · 0.70

Tested by

no test coverage detected