Do you use any libraries? YUI, jQuery, prototype? Any of them have built-in support for encoding objects into JSON strings, so you need to create your own function that creates your own random objects and simply passes them to the appropriate JSON encoding methods.
source
share