i would try to write an JSONparser for gwt.
For this i use the lib org.json on server side and the com.google.gwt.json.client on client side.
I build some interface's to call this two lib with the same methods.
I use:
public class JSONObject extends com.google.gwt.json.client.JSONObject implements IJSONObject
{
...
}
and
public class JSONObject extends org.json.JSONObject implements IJSONObject
{
...
}
So it works like a sharm, but there is one thing i wouldn't get it.
Client-side:
JSONParser.parseLenient( sJson ).isObject()
Return ans Object from Type: "com.google.gwt.json.client.JSONObject"
And i try to cast this to my custom JSONObject and get an ClassCastException.
My custom JSONObject extends from com.google.gwt.json.client.JSONObject and implements my IJSONobject.
So if i can't cast the object, i can't user the interface.
Thank you
JSONParser.parseLenient( sJson ).isObject()uses your custom class?