enyo.json

enyo.json contains methods for handling JSON-formatted text.

Methods

enyo.json.parse(inJson)

Returns a JavaScript object for a given JSON string, using native stringify routine if it's available.

inJson is the JSON string to be converted to a JavaScript object.

enyo.json.stringify(inValue, inReplacer, inSpace)

Returns a JSON string for a given object, using native stringify routine if it's available.

  • inValue is the object to be converted to JSON.
  • inReplacer is an optional value inclusion array or replacement function.
  • inSpace is an optional number or string to use for pretty-printing whitespace.