json.hybrid

Classes


Public Protected Private

Global Functions

goog.json.hybrid.parse(jsonString) !Object
Attempts to parse the JSON string natively, falling back to goog.json.parse if unsuccessful.
Arguments:
jsonString : string
JSON string to parse.
Returns: !Object  Resulting JSON object.
code »
goog.json.hybrid.parse_(jsonStringfallbackParser) !Object
Attempts to parse the JSON string natively, falling back to the supplied fallbackParser if unsuccessful.
Arguments:
jsonString : string
JSON string to parse.
fallbackParser : function(string):Object
Fallback JSON parser used if native
Returns: !Object  Resulting JSON object.
code »
goog.json.hybrid.stringify(obj) string
Attempts to serialize the JSON string natively, falling back to goog.json.serialize if unsuccessful.
Arguments:
obj : !Object
JavaScript object to serialize to JSON.
Returns: string  Resulting JSON string.
code »
goog.json.hybrid.unsafeParse(jsonString) !Object
Attempts to parse the JSON string natively, falling back to goog.json.unsafeParse if unsuccessful.
Arguments:
jsonString : string
JSON string to parse.
Returns: !Object  Resulting JSON object.
code »

Package json

Package Reference