------------- <helma>/apps/Test/main.hac------------
app.addRepository('modules/core/JSON.js');
function main_action() {
var str = "Hi";
res.write(str.toJSON()); // "{}"
res.write(encodeURIComponent(str.toJSON())); // "%7b%7d"
}
-----------------------------------------------------------------
The expected result in browsers is ""Hi"" (or escaped as "%22Hi%22"),
as seen with the Crockford parser. I've never done server-side
javascript before... is this an intended behavior for Rhino?
-Sam