angular.toJson
Description
Serializes the input into a JSON formated string.
Usage
angular.toJson(obj, pretty);
Parameters
- obj –
{Object|Array|Date|string|number}
– Input to jsonify.
- pretty –
{boolean=}
– If set to true, the JSON output will contain newlines and whitespace.
Returns
{string} Jsonified string representing obj
.