json.Serializer Extends Object
Class that is used to serialize JSON objects to a string.

Inheritance

Constructor

goog.json.Serializer(opt_replacer)

Parameters

opt_replacer :
(function (this:Object, string, *): * | null | undefined)
Replacer.

Instance Methods

Public Protected Private
replacer_()
No description.
code »
serialize(object)
Serializes an object or a value to a JSON string.
Arguments:
object :
*
The object to serialize.
Returns:   A JSON string representation of the input.
code »
serializeArray_(arrsb)
Serializes an array to a JSON string
Arguments:
arr :
(Array | null)
The array to serialize.
sb :
(Array | null)
Array used as a string builder.
code »
serializeNumber_(nsb)
Serializes a number to a JSON string
Arguments:
n :
The number to serialize.
sb :
(Array | null)
Array used as a string builder.
code »
serializeObject_(objsb)
Serializes an object to a JSON string
Arguments:
obj :
(Object | null)
The object to serialize.
sb :
(Array | null)
Array used as a string builder.
code »
serializeString_(ssb)
Serializes a string to a JSON string
Arguments:
s :
The string to serialize.
sb :
(Array | null)
Array used as a string builder.
code »
serialize_(objectsb)
Serializes a generic value to a JSON string
Arguments:
object :
*
The object to serialize.
sb :
(Array | null)
Array used as a string builder.
code »

Static Methods

goog.json.Serializer.call()
No description.
code »

Static Properties

goog.json.Serializer.charToJsonCharCache_ :
(Object | null)
Character mappings used internally for goog.string.quote
Code »
goog.json.Serializer.charsToReplace_ :
(RegExp | null)
Regular expression used to match characters that need to be replaced. The S60 browser has a bug where unicode characters are not matched by regular expressions. The condition below detects such behaviour and adjusts the regular expression accordingly.
Code »

Package json

Package Reference