parmanoir/jscocoa — pull request #4 by mugginsoft (2012-04-25 22:32:18+00:00)
Title: Added toJSObject: controller method

Hi Patrick

Similar to toJS: except this returns a JS object when encoding a dictionary, not an array with named properties.
The output from toJSObject: can be successfully passed to JSON.stringify().
The output from toJS: cannot be correctly encoded by JSON.stringify() if the input contains an NSDictionary instance.

An alternative would be to modify toJS: to exhibit the behaviour of toJSObject:

Regards

Jonathan