* @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)
| 1137 | * @returns {Object|Array|string|number} Deserialized thingy. |
| 1138 | */ |
| 1139 | function fromJson(json) { |
| 1140 | return isString(json) |
| 1141 | ? JSON.parse(json) |
| 1142 | : json; |
| 1143 | } |
| 1144 | |
| 1145 | |
| 1146 | function toBoolean(value) { |
no test coverage detected