Fork me on GitHub

Module core/json

RingoJS provides native JSON support, so applications don't need to require this package in order to make use of JSON. It is here for backwards compatibility only.

Class JSON

Static Methods


JSON.parse (str)

Parses a JSON string to a JavaScript object.

Parameters

String str a JSON string

Returns

Object the Object decoded from str

JSON.stringify (obj)

Encodes a JavaScript object to a JSON encoded String.

Parameters

Object obj convert an object to a JSON string

Returns

String a JSON string representing the object