Hello Sebastian,

you can also simplify your code as follow:

import org.json.JSONException;
import org.json.JSONObject;
import org.restlet.resource.Get;
import org.restlet.resource.ServerResource;

public class TestJsonServerResource extends ServerResource {
    @Get
    public JSONObject doGet() throws JSONException {
        JSONObject json = new JSONObject();
        json.put("test", "Test");
        json.put("test2", "Test2");
        return json;
    }
}

(please note that this simplification is not part of the zip file I've just 
sent to you.)

Best regards,
Thierry Boileau

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

Reply via email to