Improve this Doc View Source angular.toJson
- function in module ng
Serializes input into a JSON-formatted string. Properties with leading $ characters will be stripped since angular uses this notation internally.
Usage
angular.toJson(obj, [pretty]);
Arguments
Param | Type | Details |
---|---|---|
obj | Object Array Date string number | Input to be serialized into JSON. |
pretty (optional) | boolean | If set to true, the JSON output will contain newlines and whitespace. |
Returns
string undefined
|
JSON-ified string representing |
© 2010–2017 Google, Inc.
Licensed under the Creative Commons Attribution License 4.0.
https://code.angularjs.org/1.2.32/docs/api/ng/function/angular.toJson