Hello,
I am using SmartClient Version: SC_SNAPSHOT-2011-12-05/LGPL Development Only (built 2011-12-05)
with Chrome or Firefox.
We communicate with our server using REST services and have recently upgraded our Jackson version to version 2 to take advantage of the @JsonIdentityInfo annotation for this reason:
"Jackson 2.0 adds support for concept called "Object Identity":ability to serialize Object Id for values, use this id for secondary references; and ability to resolve these references when deserializing)"
Using some test classes, an example of the output of this is as follows:
The parentCategory in the activityList now has just a reference.
Unfortunately when this gets to the Datasource I understandably get the following error:
Are there any plans to support Jackson 2 annotations in the future?
Is there any way of telling smartgwt to use Jackson 2 for deseralising?
Kind Regards,
Jeni
I am using SmartClient Version: SC_SNAPSHOT-2011-12-05/LGPL Development Only (built 2011-12-05)
with Chrome or Firefox.
We communicate with our server using REST services and have recently upgraded our Jackson version to version 2 to take advantage of the @JsonIdentityInfo annotation for this reason:
"Jackson 2.0 adds support for concept called "Object Identity":ability to serialize Object Id for values, use this id for secondary references; and ability to resolve these references when deserializing)"
Using some test classes, an example of the output of this is as follows:
Code:
"{ "@id": 1, "id": 2, "name":"testCategory", "activityList": [ { "@id": 2, "id": 1, "name":"testActivity", "parentCategory": 1 } ] }"
Unfortunately when this gets to the Datasource I understandably get the following error:
Code:
java.lang.IllegalArgumentException: invoke arguments: JS value of type int, expected com.google.gwt.core.client.JavaScriptObject at com.google.gwt.dev.shell.JsValueGlue.get(JsValueGlue.java:178) at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:65) at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172) at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessagesWhileWaitingForReturn(BrowserChannelServer.java:338) at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:219) at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136) at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:571) at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:279) at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91) at com.google.gwt.core.client.impl.Impl.apply(Impl.java) at com.google.gwt.core.client.impl.Impl.entry0(Impl.java:242) at sun.reflect.GeneratedMethodAccessor51.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103) at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71) at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172) at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessages(BrowserChannelServer.java:293) at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:547) at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:364) at java.lang.Thread.run(Thread.java:722)
Is there any way of telling smartgwt to use Jackson 2 for deseralising?
Kind Regards,
Jeni
Comment