Core Docs | Additional Modules Docs

sb.json


@Description: Converts a string or object to json.
@File: json/encode.js
@Author: Paul Visco v1.02 02/09/09 Taken from http://devers.blogspot.com/2007/09/worlds-smallest-tojson-function.html
@Param: String x A String, array or object to convert to JSON
@Return: String in JSON format
@Example:
var f = {
    name : 'fred'
};
sb.json.encode(f);