and the current code is like this one :

@Post()
    public void post(StringRepresentation loginRep) throws JSONException {
        Utilisateur user =
                (new Gson()).fromJson(loginRep.getText(),
Utilisateur.class);
    }

2012/10/26 xavier.meh...@free.fr <xavier.meh...@free.fr>

> Hi Thierry
> I looked at your example, and actually the code differs from mine. Here is
> my code to mimic the client code :
>
>     @Put("json")
>     public void put(JsonRepresentation loginRep) throws JSONException {
>         JSONObject loginElt = loginRep.getJsonObject();
>
>         System.out.println("identifiant: " +
> loginElt.getString("identifiant"));
>         System.out.println("mot de passe: " + loginElt.getString("pwd"));
>         System.out.println("entreprise: " +
> loginElt.getString("entreprise"));
>
>     }
>
> regards
> Xavier
>
>
> 2012/10/26 Thierry Boileau <thierry.boil...@restlet.com>
>
>> Hello Xavier,
>>
>> I guess the issue is located on server side. I send you a sample project
>> in order to help you.
>>
>> Best regards,
>> Thierry Boileau
>>
>> ------------------------------------------------------
>>
>> http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=3023650
>
>
>

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=3023666

Reply via email to