JSON

RightJS provides the standard JSON interface for the old browsers which doesn’t have it by default.

Methods

parse, stringify

top ↑parse

JSON.parse(String data) -> mixed data

Description

Parses JSON string into JavaScript data

Example

JSON.parse('{"a":"b"}); // -> {a: "b"}

top ↑stringify

JSON.stringify(mixed data) -> String JSON data

Description

Converts anything into JSON format

Example

JSON.stringify({a:1}); // -> '{"a":1}'