Thank's But how can i include this library to rhino ? that all other functions in different contexts and scopes can use it.
Also it's more general question how can I write Java and JavaScript function which can comunicate without efforts - just write "brigde" which will do all work for given object type. On Jul 5, 5:50 pm, Attila Szegedi <[EMAIL PROTECTED]> wrote: > Sure, use a JSON library written in JS :-) > See: <http://www.JSON.org/js.html> > After incorporating it in your program, just pass JSON.stringify(obj) > to your Java method. > > Attila. > > On Jul 4, 2008, at 11:17 PM, DarkIT wrote: > > > > > Hi everybody, > > > I'm trying to add rhino to our application. > > Everything seams fine except I don't know how can I transform JSON > > object or JSON Array from Rhino to Java object - String (the most > > easy way) or java JSON Object. > > > Scenario I want to implement is JavaScript function which is uploaded > > to server and it's executed inside server enviroment. Inside this > > JavaScript function can be many call to Java function with in/out JSON > > objects. > > > Java function: public long save(String entity) {...} or public long > > save(JSONObject entity) {...} > > > When I call this function from Rhino I've got exception because I have > > nativeObject not String and when I try to invoke "toString()" function > > on it I received just "[object Object]" > > > Is there easy solution how to transform JavaScript JSON object to Java > > String or java JSON object? _______________________________________________ dev-tech-js-engine-rhino mailing list [email protected] https://lists.mozilla.org/listinfo/dev-tech-js-engine-rhino
