I have written a simple native method in GWT code as below:

public static native JavaScriptObject parseString(String jsonString) /*-{
        return JSON.parse(jsonString);


Now I have GWTTestCase to validate this code but the test case is failing due to com.google.gwt.core.client.JavaScriptException.

When I pass same string to another method which is using java script eval() method internally, it is able to parse string appropriately.

So, does anyone have clue what could be the issue with JSON.parse(string) ?