* @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)
| 1227 | * @returns {Object|Array|string|number} Deserialized JSON string. |
| 1228 | */ |
| 1229 | function fromJson(json) { |
| 1230 | return isString(json) |
| 1231 | ? JSON.parse(json) |
| 1232 | : json; |
| 1233 | } |
| 1234 | |
| 1235 | |
| 1236 | function timezoneToOffset(timezone, fallback) { |
no test coverage detected