MyObj params = (MyObj) JsonizerParser.parse(jsonizer, strToken);
Exception:
org.juglar.gwt.jsonizer.client.JsonizerException: null
at
com.google.gwt.dev.shell.ie.ModuleSpaceIE6.invokeNative(ModuleSpaceIE6.java:
435)
at
com.google.gwt.dev.shell.ie.ModuleSpaceIE6.invokeNativeHandle(ModuleSpaceIE6.java:
211)
at
com.google.gwt.dev.shell.JavaScriptHost.invokeNativeHandle(JavaScriptHost.java:
93)
at
org.juglar.gwt.jsonizer.client.base.BeanJsonizer.setProperties(BeanJsonizer.java:
69)
at
org.juglar.gwt.jsonizer.client.base.BeanJsonizer.asJavaObject(BeanJsonizer.java:
104)
at
org.juglar.gwt.jsonizer.client.JsonizerParser.parse(JsonizerParser.java:
48)
In fact, it is not working when there is a boolean field in the pojo.
Cheers,
PDB
public class PagedListParametersTest {
private int page;
private boolean paged;
private int currentSort;
public PagedListParametersTest() {
super();
page = -1;
}
public int getCurrentSort() {
return currentSort;
}
public void setCurrentSort(int currentSort) {
this.currentSort = currentSort;
}
public boolean getPaged() {
return paged;
}
public void setPaged(boolean paged) {
this.paged = paged;
}
public int getPage() {
return page;
}
public void setPage(int page) {
this.page = page;
}
}
The strToken value: {"page":-1,"currentSort":0,"paged":false}
The code I used for the test:
try {
final PagedListParametersTestJsonizer jsonizerTest =
(PagedListParametersTestJsonizer) GWT
.create(PagedListParametersTestJsonizer.class);
PagedListParametersTest params = new PagedListParametersTest();
String strToken = jsonizerTest.asString(params);
GWT.log(strToken, null);
params = (PagedListParametersTest) JsonizerParser.parse(jsonizerTest,
strToken);
} catch (JsonizerException e) {
GWT.log("Error getting the params object ", e);
}
Please note that if I take off the the paged attribute (private
boolean paged), it will run smoothly...
By the way, it is possible to get your project source code somewhere?
Thanks,
PDB