Edwin van de Koppel
unread,Mar 10, 2011, 5:58:16 AM3/10/11Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Google Visualization API
Hello all,
I am using the google-visualization-java in my Java AppEngine/GWT
project (Eclipse).
From the client side I am doing a HTTP get to the server side to
retrieve a com.google.visualization.datasource.DataTable object.
On that server side the DataTable object is being built up from the
app engine datastore OR memcache. In order to be able to store a
DataTable into memcache, it has to be serializable. Therefore, I
convert it to a JSON string:
String aJsonString = JsonRenderer.renderDataTable(myDataTable, true,
true).toString();
(JsonRenderer is part of the google-visualization-java package)
Yet, I cannot figure out how to turn a JSON string back into a
DataTable object.
I have tried the following:
public static native DataTable toDataTable(String theJsonString) /*-{
return new DataTable(eval("("+theJsonString+")"));
}-*/;
DataTable myDataTable = toDataTable(aJsonString);
but then I am getting a java.lang.UnsatisfiedLinkError.
So what am I doing wrong? Or is there another way?