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

Inheritance

Constructor

goog.json.Serializer(opt_replacer)

Parameters

opt_replacer : ?goog.json.Replacer=
Replacer.

Instance Methods

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

Static Properties

goog.json.Serializer.charToJsonCharCache_ :
Character mappings used internally for goog.string.quote
Code »
goog.json.Serializer.charsToReplace_ :
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