Thanks for your advice about filter called Authenticator. In your case, your
app is Java app, but my app is android app. I know what a difference a
little bit, but still for some reason I have not worked serialization.
And following the advice of Tim, I chose to serialize using the Jackson.
In the server side i receive JacksonRepresentation from client app:
/*************server side
public class AuthenticationServerResource extends ServerResource implements
AuthenticationResource {
@Post
public String login (JacksonRepresentation<Authentication> auth) throws
IOException {
//auth.write(System.out);
return "";
}
//private final static int SUCCESS_CODE = 1;
//private final static int ERROR_CODE = -1;
}
**************/
And i'm really receive JSON, because when i'm writing
auth.write(System.out); console show:
{"login":"json","password":"json123"}
So I got a JSON representation. But now I do not know how to deserialize
JacksonRepresentation to java object
I wrote followind code:
Authentication authObj = auth.getObject();
but compilator generates several error.
Can you show me how i can get the object of Authentication class.
--
View this message in context:
http://restlet-discuss.1400322.n2.nabble.com/Restlet-Framework-Serialization-Don-t-understand-how-send-and-receive-object-tp7451788p7455600.html
Sent from the Restlet Discuss mailing list archive at Nabble.com.
------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2947257