* @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)
| 1054 | * @returns {Object|Array|string|number} Deserialized thingy. |
| 1055 | */ |
| 1056 | function fromJson(json) { |
| 1057 | return isString(json) |
| 1058 | ? JSON.parse(json) |
| 1059 | : json; |
| 1060 | } |
| 1061 | |
| 1062 | |
| 1063 | /** |
no test coverage detected