Restlet On Android - Serialization Issues

I am trying to retrieve serialized classes using Restlet 2.1 with Android as a client and GAE as a server. This is the corresponding code:

ClientResource cr = new ClientResource("http://localhost:8888/mydata");
// Get the MyData object
MyDataResource resource = cr.wrap(MyDataResource.class);
MyData myData = resource.retrieve();

At first I tested this in a separate JSE class and everything worked fine. When I try to run the same in Android, the myData object is NULL. Any ideas?

+3
source share
1 answer

Here you can find out the features of Android: RESTLet website and website page

I spent several hours before that in order to understand the problem, you need to explicitly register Jackson's converter as follows:

Engine.getInstance().getRegisteredConverters().add(new JacksonConverter());
+7

Source: https://habr.com/ru/post/1775093/


All Articles