I have a javascript function ( port of Stefan Goessner's xpath for json @ 
http://goessner.net/articles/JsonPath/ )
- which I am trying to port to JSNI for use in GWT app.

I have Javascript Overlay class which wraps a json as a javascript object 

a native function wrapping the javascript - 
    public final native String getJsonPath(String expr, String argument) 
/*-{
..
..
trace: function(expr, val, path) {
            if (expr) {
               var x = expr.split(";"), loc = x.shift();
               x = x.join(";");
               if (val && val.hasOwnProperty(loc)) {
                  alert("fnc Trace: Path 1: val[loc]: " + val[loc]); // 
LINE UNDER OBSERVATION
                  P.trace(x, val[loc], path + ";" + loc); 
               }


In the line (// LINE UNDER OBSERVATION) .. val[loc]  returns a Object in 
plain javascript and returns a string in GWT JSNI ??

What am I doing wrong? Any pointers is very helpful.

Thanks and Regards.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to