tiny-json.js - JSON for tinyJS

tiny-json.js provides, if not available natively, a JSON-Object with the Methods parse and stringify.

Download

tiny-json.js [1733b] - tiny-json-min.js.gz [578b]

Hint

The JSON-Object requires only tiny.js. Other scripts are not necessary.

Usage

Within the JSON-Objekt there are the Methods parse and stringify. Parse reads a string as JSON and warns about misshaped objects. If the second argument is not true, it will even warn about functions which can state a security problem. Stringify does the opposite, it takes an object (everything but nodes and native functions) and turns it into a string. If the second argument is not true, functions are ommitted.