The goog.json.Serializer Class

goog.json.Serializer(opt_replacer)

Class that is used to serialize JSON objects to a string.

opt_replacer {?goog.json.Replacer=}
Replacer.

.serialize(object)

Serializes an object or a value to a JSON string.

object {*}
The object to serialize.
returns {string}
A JSON string representation of the input.
@throws
Error if there are loops in the object graph.